1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/11530] Remove extra quotes when depth limit is exceeded

PHPBB3-11530
This commit is contained in:
JoshyPHP
2015-05-18 03:57:48 +02:00
parent c967ba7b9b
commit c1777f4811
3 changed files with 103 additions and 1 deletions

View File

@@ -1250,6 +1250,16 @@ class parse_message extends bbcode_firstpass
return (!$update_this_message) ? $return_message : $this->warn_msg;
}
// Remove quotes that are nested too deep
if ($config['max_quote_depth'] > 0)
{
$this->message = $phpbb_container->get('text_formatter.utils')->remove_bbcode(
$this->message,
'quote',
$config['max_quote_depth']
);
}
// Check for errors
$errors = $parser->get_errors();
if ($errors)