mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-04 15:57:45 +02:00
Prevent replacement of censored words within < and >
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3147 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1090,15 +1090,16 @@ for($i = 0; $i < $total_posts; $i++)
|
|||||||
//
|
//
|
||||||
// Replace naughty words
|
// Replace naughty words
|
||||||
//
|
//
|
||||||
if ( count($orig_word) )
|
if (count($orig_word))
|
||||||
{
|
{
|
||||||
if ( $user_sig != '' )
|
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
|
||||||
|
|
||||||
|
if ($user_sig != '')
|
||||||
{
|
{
|
||||||
$user_sig = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(' . $orig_word . ', ' . $replacement_word . ', '\\0')", '>' . $user_sig . '<'), 1, -1));
|
$user_sig = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1));
|
||||||
}
|
}
|
||||||
|
|
||||||
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
|
$message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));
|
||||||
$message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(' . $orig_word . ', ' . $replacement_word . ', '\\0')", '>' . $message . '<'), 1, -1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user