From: Alexander Ebert Date: Tue, 23 Aug 2016 19:59:57 +0000 (+0200) Subject: Fix for nested source bbcodes X-Git-Tag: 3.0.0_Beta_1~541 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9eb1e9648af5d3cc9159d4a8b9bbf7240ea2b9a0;p=GitHub%2FWoltLab%2FWCF.git Fix for nested source bbcodes --- diff --git a/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php b/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php index 2b358a0de8..d7b314c37e 100644 --- a/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/HtmlBBCodeParser.class.php @@ -460,6 +460,12 @@ class HtmlBBCodeParser extends BBCodeParser { $data = array_pop($this->openTagIdentifiers); if ($data['name'] !== $name) { + // check if this is a source code tag as some people + // love to nest the same source bbcode + if (in_array($name, $this->getSourceBBCodes())) { + return $tag['source']; + } + throw new SystemException("Tag mismatch, expected '".$name."', got '".$data['name']."'."); }