Fixed removing of code tags
authorMarcel Werk <burntime@woltlab.com>
Thu, 3 Jul 2014 12:16:57 +0000 (14:16 +0200)
committerMarcel Werk <burntime@woltlab.com>
Thu, 3 Jul 2014 12:16:57 +0000 (14:16 +0200)
wcfsetup/install/files/lib/system/bbcode/BBCodeParser.class.php

index 004ace659133870f212271c9ffe8a6f5638e06f7..f3cf54b77d8eef6d12ef6f63170a03cee81d1466 100644 (file)
@@ -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;