html2plain warnings

This commit is contained in:
zotlabs 2016-12-15 13:45:27 -08:00
parent e2f1ce7758
commit f67acc82cf

View file

@ -113,7 +113,7 @@ function html2plain($html, $wraplength = 75, $compact = false)
$xpath = new DomXPath($doc);
$list = $xpath->query("//pre");
foreach ($list as $node) {
$node->nodeValue = str_replace("\n", "\r", $node->nodeValue);
$node->nodeValue = str_replace("\n", "\r", htmlspecialchars($node->nodeValue));
}
$message = $doc->saveHTML();