aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2016-03-27 19:09:06 +0700
committerrxu <rxu@mail.ru>2016-03-27 19:09:06 +0700
commit0ca32c41b5f82f333d8deaf0f51f677d2a5e2388 (patch)
tree8a28b6ca78e3da0443e1974550dd3420ac4bcc07
parent2bfbc07b7db8fbd5506b61a4e988363bfe955467 (diff)
downloadforums-0ca32c41b5f82f333d8deaf0f51f677d2a5e2388.tar
forums-0ca32c41b5f82f333d8deaf0f51f677d2a5e2388.tar.gz
forums-0ca32c41b5f82f333d8deaf0f51f677d2a5e2388.tar.bz2
forums-0ca32c41b5f82f333d8deaf0f51f677d2a5e2388.tar.xz
forums-0ca32c41b5f82f333d8deaf0f51f677d2a5e2388.zip
[ticket/14559] Remove attachment BBCode tags from the quoted message
PHPBB3-14559
-rw-r--r--phpBB/posting.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 263809e998..653740ae1c 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -1589,6 +1589,9 @@ $message_parser->decode_message($post_data['bbcode_uid']);
if ($generate_quote)
{
+ // Remove attachment bbcode tags from the quoted message to avoid mixing with the new post attachments if any
+ $message_parser->message = preg_replace('#\[attachment=([0-9]+)\](.*?)\[\/attachment\]#uis', '\\2', $message_parser->message);
+
if ($config['allow_bbcode'])
{
$message_parser->message = '[quote=&quot;' . $post_data['quote_username'] . '&quot;]' . censor_text(trim($message_parser->message)) . "[/quote]\n";