diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 138c7f48bf..ab0ee59943 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -523,10 +523,10 @@ class bbcode_firstpass extends bbcode $out .= array_pop($list_end_tags) . ']'; $tok = '['; } - else if (preg_match('#list(=[0-9a-z])?#i', $buffer, $m)) + else if (preg_match('#^list(=[0-9a-z])?$#i', $buffer, $m)) { // sub-list, add a closing tag - if (empty($m[1]) || preg_match('/^(disc|square|circle)$/i', $m[1])) + if (empty($m[1]) || preg_match('/^(?:disc|square|circle)$/i', $m[1])) { array_push($list_end_tags, '/list:u:' . $this->bbcode_uid); }