commit
166b8ad440
|
@ -180,7 +180,9 @@ class HTML
|
||||||
$xpath = new DomXPath($doc);
|
$xpath = new DomXPath($doc);
|
||||||
$list = $xpath->query("//pre");
|
$list = $xpath->query("//pre");
|
||||||
foreach ($list as $node) {
|
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();
|
$message = $doc->saveHTML();
|
||||||
|
|
|
@ -329,6 +329,11 @@ class Processor
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($object['id'])) {
|
||||||
|
Logger::log('Activity ' . $url . ' has got not id, aborting. ' . json_encode($object));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$activity = [];
|
$activity = [];
|
||||||
$activity['@context'] = $object['@context'];
|
$activity['@context'] = $object['@context'];
|
||||||
unset($object['@context']);
|
unset($object['@context']);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user