From 63fc19ce4854415f3040c20cb8d704da4bbed8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Sch=C3=BCle?= Date: Thu, 27 Apr 2023 08:34:40 +0200 Subject: [PATCH] fix(Felamimail/Vacation): fix html vacation ... as this created visible html elements in vacation messages --- tine20/Felamimail/Sieve/Vacation.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tine20/Felamimail/Sieve/Vacation.php b/tine20/Felamimail/Sieve/Vacation.php index dcaef28def0..70e3cc13009 100644 --- a/tine20/Felamimail/Sieve/Vacation.php +++ b/tine20/Felamimail/Sieve/Vacation.php @@ -332,9 +332,7 @@ protected function _getFormattedHTMLBody(string $reason): string $doc = new DOMDocument('1.0', 'UTF-8'); $doc->preserveWhiteSpace = true; $doc->formatOutput = true; - $html = $doc->createElement('html'); - $html->appendChild($doc->createElement('body', $reason)); - $doc->appendChild($html); + $doc->loadHTML('' . $reason); $doc->saveXML(); $xpath = new DOMXPath($doc); $bodyNodes = $xpath->query('/html/body')->item(0)->childNodes; @@ -344,7 +342,7 @@ protected function _getFormattedHTMLBody(string $reason): string } return implode(PHP_EOL, $outputFragments); } - + /** * quote string for usage in Sieve script *