aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2015-05-18 03:57:48 +0200
committerJoshyPHP <s9e.dev@gmail.com>2015-05-18 03:57:48 +0200
commitc1777f481101c0a311939f83f2afd38a0c09e394 (patch)
tree8ef20d98dbb5aa58ae4b5a347f0b20e8905324c0 /phpBB/includes/message_parser.php
parentc967ba7b9ba42d9cf72cd1bb0927ae5214894eda (diff)
downloadforums-c1777f481101c0a311939f83f2afd38a0c09e394.tar
forums-c1777f481101c0a311939f83f2afd38a0c09e394.tar.gz
forums-c1777f481101c0a311939f83f2afd38a0c09e394.tar.bz2
forums-c1777f481101c0a311939f83f2afd38a0c09e394.tar.xz
forums-c1777f481101c0a311939f83f2afd38a0c09e394.zip
[ticket/11530] Remove extra quotes when depth limit is exceeded
PHPBB3-11530
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 9fe598d7fb..f018d735a7 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -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)