From ada6e5d6b39152bd07a77f3987c42fe81dcdf002 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 8 Jan 2017 19:41:05 +0100 Subject: [PATCH] Fixed amp syntax issues --- .../html/output/AmpHtmlOutputProcessor.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wcfsetup/install/files/lib/system/html/output/AmpHtmlOutputProcessor.class.php b/wcfsetup/install/files/lib/system/html/output/AmpHtmlOutputProcessor.class.php index 7f7c338e55..97bb5bf859 100644 --- a/wcfsetup/install/files/lib/system/html/output/AmpHtmlOutputProcessor.class.php +++ b/wcfsetup/install/files/lib/system/html/output/AmpHtmlOutputProcessor.class.php @@ -89,6 +89,19 @@ class AmpHtmlOutputProcessor extends HtmlOutputProcessor { DOMUtil::removeNode($element); } } + + // strip invalid attribute 'style' + /** @var \DOMElement $element */ + foreach ($this->getHtmlOutputNodeProcessor()->getXPath()->query('//*[@style]') as $element) { + $element->removeAttribute('style'); + } + } + + /** + * @inheritDoc + */ + public function getHtml() { + return str_ireplace('getHtmlOutputNodeProcessor()->getHtml()); } /** -- 2.20.1