mirror of
https://github.com/friendica/friendica
synced 2025-04-26 12:30:11 +00:00
Warning and notice fixed
This commit is contained in:
parent
16f58c8982
commit
fd6c64f9c1
2 changed files with 8 additions and 1 deletions
|
@ -180,7 +180,9 @@ class HTML
|
|||
$xpath = new DomXPath($doc);
|
||||
$list = $xpath->query("//pre");
|
||||
foreach ($list as $node) {
|
||||
$node->nodeValue = str_replace("\n", "\r", $node->nodeValue);
|
||||
// Ensure to escape unescaped & - they will otherwise raise a warning
|
||||
$safe_value = preg_replace('/&(?!\w+;)/', '&', $node->nodeValue);
|
||||
$node->nodeValue = str_replace("\n", "\r", $safe_value);
|
||||
}
|
||||
|
||||
$message = $doc->saveHTML();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue