make sure to decode html special chars before sending over the wire and

This commit is contained in:
Mario
2024-02-21 10:44:56 +00:00
parent b7bc28c333
commit 17e2877c91
3 changed files with 14 additions and 8 deletions

View File

@@ -114,6 +114,13 @@ function escape_tags($string) {
return (htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false));
}
function unescape_tags($string) {
if (!$string) {
return EMPTY_STR;
}
return (htmlspecialchars_decode($string, ENT_COMPAT));
}
/**
* Escape URL's so they're safe for use in HTML and in HTML element attributes.
*/