fix: correções Baixo da auditoria (escaping, dvh, transições, assets)

Fecha os itens 3.2.2, 3.3.1, 4.6, 5.2, 5.6, 5.7 e 7.4 do relatório de
auditoria de 2026-09-24: escapa saídas de site_img_url()/canonical,
valida identificadores de coluna em db_info_save(), troca 100vh por
100dvh, remove a última cor solta, encurta a transição para ~150ms,
acrescenta decoding=async/fetchpriority=high nas imagens da home, e
documenta as versões vendorizadas em ASSETS.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
andreandClaude Sonnet 5 committed 2026-09-25 12:16:33 +01:00
1 parent fcf86b60ea
commit 5cf0f14ad2
11 files changed
+69 -25

No files matched your search

+5
View File
@@ -43,6 +43,11 @@ function info_from_post(array $post, array &$errors): array {
function db_info_save(PDO $pdo, array $data): bool {
$cols = array_keys(info_fields());
foreach ($cols as $c) {
if (!preg_match('/^[A-Za-z0-9_]+$/', $c)) {
throw new InvalidArgumentException("Nome de coluna inválido: $c");
}
}
// One row per gym (id = gyms.id): the gym being edited in the backoffice.
$gid = admin_gym_id();
$__before = audit_row($pdo, 'fitme3070_info', 'id', (int) $gid);
+1 -1
View File
@@ -194,5 +194,5 @@ function modalidade_icon_html(?string $icon): string {
return $svg;
}
}
return '<img loading="lazy" draggable="false" src="' . htmlspecialchars(site_img_url($icon, 'uploads/modalidades/icons')) . '" alt="">';
return '<img loading="lazy" decoding="async" draggable="false" src="' . htmlspecialchars(site_img_url($icon, 'uploads/modalidades/icons')) . '" alt="">';
}