Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
fix(Felamimail/Vacation): fix html vacation
Browse files Browse the repository at this point in the history
... as this created visible html elements in vacation messages
  • Loading branch information
pschuele committed Apr 27, 2023
1 parent 834783b commit 63fc19c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tine20/Felamimail/Sieve/Vacation.php
Expand Up @@ -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('<?xml version="1.0" encoding="utf-8"?>' . $reason);
$doc->saveXML();
$xpath = new DOMXPath($doc);
$bodyNodes = $xpath->query('/html/body')->item(0)->childNodes;
Expand All @@ -344,7 +342,7 @@ protected function _getFormattedHTMLBody(string $reason): string
}
return implode(PHP_EOL, $outputFragments);
}

/**
* quote string for usage in Sieve script
*
Expand Down

0 comments on commit 63fc19c

Please sign in to comment.