Some fix in admin panel

Some fix in admin Panel
This commit is contained in:
novgorodschi catalin
2026-06-29 10:25:45 +03:00
parent 7504045386
commit beb960678f
+5 -2
View File
@@ -64,9 +64,12 @@ function admin_input_id(array $source, string $key): ?int
*/ */
function e(string $value): string function e(string $value): string
{ {
return htmlspecialchars($value, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); // decode first prevents ' / ' double encoding
return htmlspecialchars(html_entity_decode($value, ENT_QUOTES, 'UTF-8'),
ENT_QUOTES | ENT_SUBSTITUTE,
'UTF-8'
);
} }
/** /**
* Whitelist-validate the ?p= parameter. * Whitelist-validate the ?p= parameter.
* Returns the validated page string, or '' if not in the whitelist. * Returns the validated page string, or '' if not in the whitelist.