aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-04-03 16:34:43 +0200
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-04-03 16:34:43 +0200
commitd0f5b39f117376a037bdeabc91f32c1d5436d99b (patch)
treedfa3c2fbb4d258279c3447dbaaa7e50a8c7726d4
parenta2f517fb38b41a3390b1b72ec11ea7cfeba254ec (diff)
parent0ca32c41b5f82f333d8deaf0f51f677d2a5e2388 (diff)
downloadforums-d0f5b39f117376a037bdeabc91f32c1d5436d99b.tar
forums-d0f5b39f117376a037bdeabc91f32c1d5436d99b.tar.gz
forums-d0f5b39f117376a037bdeabc91f32c1d5436d99b.tar.bz2
forums-d0f5b39f117376a037bdeabc91f32c1d5436d99b.tar.xz
forums-d0f5b39f117376a037bdeabc91f32c1d5436d99b.zip
Merge pull request #4253 from rxu/ticket/14559
[ticket/14559] Remove attachment BBCode tags from the quoted message * rxu/ticket/14559: [ticket/14559] Remove attachment BBCode tags from the quoted message
-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";