From 08161e09e21b0e002325550db8bf653a72c8d362 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 9 Sep 2003 01:01:59 +0000 Subject: [PATCH] I hate regexps ... git-svn-id: file:///svn/phpbb/trunk@4491 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 91445d8df2..f12bf21627 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -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;