From aad92844cc0da61a2b30d9757ac4d1ae43adfec7 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 3 Jul 2014 14:16:57 +0200 Subject: [PATCH] Fixed removing of code tags --- .../install/files/lib/system/bbcode/BBCodeParser.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/bbcode/BBCodeParser.class.php b/wcfsetup/install/files/lib/system/bbcode/BBCodeParser.class.php index 004ace6591..f3cf54b77d 100644 --- a/wcfsetup/install/files/lib/system/bbcode/BBCodeParser.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/BBCodeParser.class.php @@ -553,13 +553,13 @@ class BBCodeParser extends SingletonFactory { */ public function removeCodeTags($message) { if (!empty($this->sourceCodeRegEx)) { - return preg_replace("~(\[(?:".$this->sourceCodeRegEx.") + return preg_replace("~(\[(".$this->sourceCodeRegEx.") (?:= (?:\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|[^,\]]*) (?:,(?:\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|[^,\]]*))* )?\]) (.*?) - (?:\[/code\])~six", '', $message); + (?:\[/\\2\])~six", '', $message); } return $message; -- 2.20.1