mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00: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:
parent
d8c35f8b20
commit
0cf61741e5
1 changed files with 3 additions and 7 deletions
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue