fix media info xss

This commit is contained in:
xiaomlove
2025-12-15 19:35:37 +07:00
parent 88f2318699
commit d255499e83
2 changed files with 13 additions and 6 deletions

View File

@@ -1673,3 +1673,11 @@ JS;
\Nexus\Nexus::js("js/crypto-js.js", 'footer', true);
\Nexus\Nexus::js($js, 'footer', false);
}
function nexus_escape($data): array|string
{
if (is_array($data)) {
return array_map('nexus_escape', $data);
}
return htmlspecialchars($data, ENT_QUOTES, 'UTF-8');
}