[ticket/13880] Replaced the quote regexp to allow brackets

This matches the regexp used in bbcode::bbcode_cache_init()

PHPBB3-13880
This commit is contained in:
JoshyPHP 2015-06-27 04:25:54 +02:00
parent 817db2f135
commit ae2237f640

View file

@ -1848,7 +1848,7 @@ class parse_message extends bbcode_firstpass
public function remove_nested_quotes($max_depth)
{
// Capture all [quote] and [/quote] tags
preg_match_all('(\\[/?quote(?:=[^]]+)?:' . $this->bbcode_uid . '\\])', $this->message, $matches, PREG_OFFSET_CAPTURE);
preg_match_all('(\\[/?quote(?:="(.*?)")?:' . $this->bbcode_uid . '\\])', $this->message, $matches, PREG_OFFSET_CAPTURE);
// Iterate over the quote tags to mark the ranges that must be removed
$depth = 0;