Blank titles are filled with the url

This commit is contained in:
Frederic Guillot 2013-05-05 21:44:03 -04:00
parent 00644bb2b8
commit 5ada718357
3 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,8 @@ class Atom extends Parser
$item->author = $author;
$item->content = $this->filterHtml($this->getContent($entry), $item->url);
if (empty($item->title)) $item->title = $item->url;
$this->items[] = $item;
}

View File

@ -9,7 +9,6 @@ class Rss10 extends Parser
$this->content = $this->normalizeData($this->content);
\libxml_use_internal_errors(true);
$xml = \simplexml_load_string($this->content);
if ($xml === false) {
@ -74,6 +73,8 @@ class Rss10 extends Parser
}
}
if (empty($item->title)) $item->title = $item->url;
$item->id = $item->url;
$item->content = $this->filterHtml($item->content, $item->url);
$this->items[] = $item;

View File

@ -91,6 +91,8 @@ class Rss20 extends Parser
$item->id = $item->url;
}
if (empty($item->title)) $item->title = $item->url;
$item->content = $this->filterHtml($item->content, $item->url);
$this->items[] = $item;
}