Improve filtration of special characters

This commit is contained in:
Dmitriy Simushev 2014-05-15 12:09:16 +00:00
parent b399cf74e9
commit d7153a4bf1

View File

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