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