Merge pull request #3766 from annando/trim-feed

Feeds are now trimmed before importing
This commit is contained in:
rabuzarus 2017-10-07 20:40:33 +02:00 committed by GitHub
commit 22f4e3973e

View File

@ -28,7 +28,7 @@ function feed_import($xml,$importer,&$contact, &$hub, $simulate = false) {
} }
$doc = new DOMDocument(); $doc = new DOMDocument();
@$doc->loadXML($xml); @$doc->loadXML(trim($xml));
$xpath = new DomXPath($doc); $xpath = new DomXPath($doc);
$xpath->registerNamespace('atom', NAMESPACE_ATOM1); $xpath->registerNamespace('atom', NAMESPACE_ATOM1);
$xpath->registerNamespace('dc', "http://purl.org/dc/elements/1.1/"); $xpath->registerNamespace('dc', "http://purl.org/dc/elements/1.1/");