From 0a6276f31a80c78e4b10c4c26ecd47ce82aab1cb Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 24 Aug 2016 22:50:50 +0200 Subject: [PATCH] bbcodes return an encoded marker --- .../system/html/node/AbstractHtmlNodeProcessor.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php b/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php index 94884bd4c9..b2d70057ce 100644 --- a/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php @@ -81,7 +81,12 @@ abstract class AbstractHtmlNodeProcessor implements IHtmlNodeProcessor { $obj = $data['object']; $string = $obj->replaceTag($data['data']); $html = preg_replace_callback('~(?P[\s\S]*)~', function($matches) use ($string) { - $string = str_replace('', $matches['content'], $string); + if (mb_strpos($string, '') !== false) { + return str_replace('', $matches['content'], $string); + } + else if (mb_strpos($string, '<!-- META_CODE_INNER_CONTENT -->') !== false) { + return str_replace('<!-- META_CODE_INNER_CONTENT -->', $matches['content'], $string); + } return $string; }, $html); -- 2.20.1