1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-05 22:14:59 +02:00

I hate regexps ...

git-svn-id: file:///svn/phpbb/trunk@4491 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-09-09 01:01:59 +00:00
parent 7b037d5e42
commit 08161e09e2

View File

@ -30,7 +30,7 @@ function request_var($var_name, $default)
// not generally applicable elsewhere
if ($type == 'string')
{
$var = trim(preg_replace("#\s{2,}#s", ' ', strtr($var, array_flip(get_html_translation_table(HTML_ENTITIES)))));
$var = trim(stripslashes(preg_replace(array("#[ \xFF]{2,}#s", "#[\r\n]{2,}#s"), array(' ', "\n"), strtr($var, array_flip(get_html_translation_table(HTML_ENTITIES))))));
}
return $var;