1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

Cleaned usernames contain only single spaces, so 'a_name' and 'a__name' are treated as the same name [Bug #15634]

git-svn-id: file:///svn/phpbb/trunk@8261 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann
2007-12-04 16:20:38 +00:00
parent 2ae1f1c3a8
commit e129450b40
3 changed files with 26 additions and 10 deletions

View File

@@ -1829,6 +1829,9 @@ function utf8_clean_string($text)
// Other control characters
$text = preg_replace('#(?:[\x00-\x1F\x7F]+|(?:\xC2[\x80-\x9F])+)#', '', $text);
// we need to reduce multiple spaces to a single one
$text = preg_replace('# {2,}#', ' ', $text);
// we can use trim here as all the other space characters should have been turned
// into normal ASCII spaces by now
return trim($text);