mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 11:45:56 +00:00
parser: trim some some feed-extracted data link titles and links
This commit is contained in:
@@ -205,6 +205,10 @@ class FeedParser {
|
||||
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";
|
||||
@@ -252,7 +256,7 @@ class FeedParser {
|
||||
|
||||
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;
|
||||
@@ -261,7 +265,7 @@ class FeedParser {
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user