mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 09:46:46 +02:00
hhmm, string cleanup was rather ... broken
git-svn-id: file:///svn/phpbb/trunk@4733 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -19,13 +19,9 @@ function set_var(&$result, $var, $type)
|
|||||||
|
|
||||||
if ($type == 'string')
|
if ($type == 'string')
|
||||||
{
|
{
|
||||||
// Prevent use of , excess spaces or other html entity forms in profile strings,
|
$result = trim(htmlspecialchars(str_replace(array("\r\n", "\r", '\xFF'), array("\n", "\n", ' '), $result)));
|
||||||
// not generally applicable elsewhere
|
$result = preg_replace("#\n{3,}#", "\n\n", $result);
|
||||||
$result = htmlspecialchars(trim(preg_replace(array("#[ \xFF]{2,}#s", "#[\r\n]{2,}#s"), array(' ', "\n"), $result)));
|
$result = (STRIP) ? stripslashes($result) : $result;
|
||||||
if (STRIP)
|
|
||||||
{
|
|
||||||
$result = stripslashes($result);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user