Improve filtration of special characters

This commit is contained in:
Fedor A. Fetisov 2014-05-15 15:54:16 +04:00
parent a844768d08
commit 85a78c9cd1

View File

@ -859,7 +859,7 @@ function sanitize_reg_escape($string)
function safe_htmlspecialchars($string) function safe_htmlspecialchars($string)
{ {
$string = preg_replace('/[\x00-\x08\x10-\x1f\x0b]/', '', $string); $string = preg_replace('/[\x00-\x08\x0b\x0c\x0e-\x1f]/', '', $string);
return htmlspecialchars($string, ENT_QUOTES); return htmlspecialchars($string, ENT_QUOTES);
} }