From: Marcel Werk Date: Thu, 3 Jul 2014 12:16:57 +0000 (+0200) Subject: Fixed removing of code tags X-Git-Tag: 2.1.0_Alpha_1~634 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aad92844cc0da61a2b30d9757ac4d1ae43adfec7;p=GitHub%2FWoltLab%2FWCF.git Fixed removing of code tags --- 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;