mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 23:55:26 +02:00
fix issue with HTML parsing and nasty on/style tags + incorrect matching of allowed tags
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3513 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
4b3714ee8f
commit
5c40eb6b78
@ -72,9 +72,9 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid
|
|||||||
for ($i = 0; $i < sizeof($allowed_html_tags); $i++)
|
for ($i = 0; $i < sizeof($allowed_html_tags); $i++)
|
||||||
{
|
{
|
||||||
$match_tag = trim($allowed_html_tags[$i]);
|
$match_tag = trim($allowed_html_tags[$i]);
|
||||||
if (preg_match('#^<\/?' . $match_tag . '(?!(.*?)((style)|( on[\w]+?[\s]?=))[\s]*?)#i', $hold_string))
|
if (preg_match('#^<\/?' . $match_tag . '[> ]#i', $hold_string))
|
||||||
{
|
{
|
||||||
$tagallowed = true;
|
$tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[ ]*?=|on[\w]+[ ]*?=)#i', $hold_string)) ? false : true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user