Fix issue when special chars in messages affected a browser's parser

This commit is contained in:
Fedor A. Fetisov 2013-10-03 18:18:53 +04:00
parent 0b2bff871f
commit 150fdbd3da

View File

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