From fb5f24578b46d8f7698ea4c4b3d764c4b0a1aa64 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 5 May 2007 18:09:58 +0000 Subject: bugfixes. :/ An ugly one included as a temporary solution... git-svn-id: file:///svn/phpbb/trunk@7476 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/message_parser.php') diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index b55a5fa069..acb9f50ce6 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1031,8 +1031,23 @@ class parse_message extends bbcode_firstpass // Parse URL's if ($allow_magic_url) { + $replaced = false; + + // We have the bbcode uid here, let's at least try to circumvent a specific bug... + if ($allow_bbcode && strpos($this->message, '[/quote:' . $this->bbcode_uid . ']') !== false && strpos($this->message, '":' . $this->bbcode_uid . ']') !== false) + { + $this->message = str_replace('":' . $this->bbcode_uid . ']', '"":' . $this->bbcode_uid . ']', $this->message); + $replaced = true; + } + $this->magic_url(generate_board_url()); - + + // Revert our change above + if ($replaced) + { + $this->message = str_replace('"":' . $this->bbcode_uid . ']', '":' . $this->bbcode_uid . ']', $this->message); + } + if ($config['max_' . $mode . '_urls']) { $num_urls += preg_match_all('#\