From: Alexander Ebert Date: Mon, 1 Aug 2016 15:07:05 +0000 (+0200) Subject: Removed doctype and fixed entities for text/plain X-Git-Tag: 3.0.0_Beta_1~823 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a2bfc128cd22e42cca148be3fbc4efb9e78765fd;p=GitHub%2FWoltLab%2FWCF.git Removed doctype and fixed entities for text/plain Fixes #2069 --- 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 57a7f1466d..94884bd4c9 100644 --- a/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php @@ -72,6 +72,7 @@ abstract class AbstractHtmlNodeProcessor implements IHtmlNodeProcessor { $html = $this->document->saveHTML($this->document->getElementsByTagName('body')->item(0)); // remove nuisance added by PHP + $html = preg_replace('~^]+>\n~', '', $html); $html = preg_replace('~^~', '', $html); $html = preg_replace('~$~', '', $html); diff --git a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php index 175ea2884f..b34e21f657 100644 --- a/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/output/node/HtmlOutputNodeProcessor.class.php @@ -100,6 +100,7 @@ class HtmlOutputNodeProcessor extends AbstractHtmlNodeProcessor { if ($this->outputType === 'text/plain') { $html = StringUtil::trim($html); + $html = StringUtil::decodeHTML($html); } return $html;