libxml_use_internal_errors(true);
libxml_clear_errors();
$this->doc = new DOMDocument();
- $this->doc->preserveWhiteSpace = false;
$this->doc->loadXML($data);
mb_substitute_character("none");
libxml_clear_errors();
$this->doc = new DOMDocument();
- $this->doc->preserveWhiteSpace = false;
$this->doc->loadXML($data);
$error = libxml_get_last_error();
libxml_clear_errors();
$this->doc = new DOMDocument();
- $this->doc->preserveWhiteSpace = false;
$this->doc->loadXML($data);
$error = libxml_get_last_error();
break;
}
+
+ if ($this->title) $this->title = trim($this->title);
+ if ($this->link) $this->link = trim($this->link);
+
} else {
if( !isset($this->error) ){
$this->error = "Unknown/unsupported feed type";
foreach ($links as $link) {
if (!$rel || $link->hasAttribute('rel') && $link->getAttribute('rel') == $rel) {
- array_push($rv, $link->getAttribute('href'));
+ array_push($rv, trim($link->getAttribute('href')));
}
}
break;
foreach ($links as $link) {
if (!$rel || $link->hasAttribute('rel') && $link->getAttribute('rel') == $rel) {
- array_push($rv, $link->getAttribute('href'));
+ array_push($rv, trim($link->getAttribute('href')));
}
}
break;