1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Further word censor fix to work with UTF8 correctly

Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9726 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Ruslan Uzdenov
2009-07-07 12:59:30 +00:00
parent 4991cae3a1
commit eb4eee77ac
2 changed files with 2 additions and 1 deletions

View File

@@ -86,7 +86,7 @@ class cache extends acm
{
if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
{
$censors['match'][] = '#(?<!\p{L})(' . str_replace('\*', '\p{L}*?', preg_quote($row['word'], '#')) . ')(?!\p{L})#u';
$censors['match'][] = '#(?<![\p{Nd}\p{L}_])(' . str_replace('\*', '[\p{Nd}\p{L}_]*?', preg_quote($row['word'], '#')) . ')(?![\p{Nd}\p{L}_])#u';
}
else
{