Fixed detection of HTML
authorAlexander Ebert <ebert@woltlab.com>
Fri, 22 Jul 2016 11:24:14 +0000 (13:24 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 22 Jul 2016 12:26:38 +0000 (14:26 +0200)
wcfsetup/install/files/lib/system/html/input/HtmlInputProcessor.class.php

index 686d9a81f1755ab796926282de9b0ac3eb4a0d58..c8a879a02449ca513991af312b7e3b2e077211fe 100644 (file)
@@ -157,7 +157,7 @@ class HtmlInputProcessor extends AbstractHtmlProcessor {
         * @return      string          parsed html string
         */
        protected function convertToHtml($html) {
-               if (!preg_match('~^<[a-zA-Z\-]+~', $html) || !preg_match('~</[a-zA-Z\-]>$~', $html)) {
+               if (!preg_match('~^<[a-zA-Z\-]+~', $html) || !preg_match('~</[a-zA-Z\-]+>$~', $html)) {
                        $html = StringUtil::encodeHTML($html);
                        $parts = preg_split('~(\n+)~', $html, null, PREG_SPLIT_DELIM_CAPTURE);