From b3e13ba28bc9ac57d9f6f9f5cf369814766670fc Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 31 Jan 2019 12:42:04 +0100 Subject: Sanitizing RSS proxy --- providers/Rss.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'providers') diff --git a/providers/Rss.php b/providers/Rss.php index f2fc015..4937f57 100644 --- a/providers/Rss.php +++ b/providers/Rss.php @@ -37,14 +37,16 @@ class Rss extends \Providers\Provider { protected function _mapItems($content) { $items = []; foreach ($content as $contentString) { - $item = new \SimpleXMLElement(str_replace(['content:encoded>', '', '<', '', '', '<', 'ID = strval($item->id ?: $item->guid); $itemObject->Title = strval($item->title); $itemObject->Time = strval($item->published ?: $item->pubDate); $itemObject->Text = strval($item->summary ?: $item->description ?: $item->content); $itemObject->Link = strval(isset($item->link['href']) ? $item->link->attributes()['href'] : $item->link); - $itemObject->Author = strval(is_string($item->author) ? $item->author : $item->author->name); + $itemObject->Author = strval($item->creator ? $item->creator : (is_string($item->author) ? $item->author : $item->author->name)); $items[] = $itemObject; } return $items; -- cgit v1.2.3