From b12e151bcdbeb46a4199006a811da365317e5c7a Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sat, 25 May 2013 03:28:51 +0200 Subject: [PATCH] Also html decode the links to the page to not break on nyaa torrents --- CHANGELOG | 3 +++ utility/feedfetcher.php | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 245d07e07..2f115a2ac 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +ownCloud-news (0.104) +* Also html decode the links to the page to not break on nyaa torrents + ownCloud-news (0.103) * Fixed a bug that prevented deleting feeds when a folder was deleted diff --git a/utility/feedfetcher.php b/utility/feedfetcher.php index 0083f1969..63e666f65 100644 --- a/utility/feedfetcher.php +++ b/utility/feedfetcher.php @@ -111,10 +111,11 @@ class FeedFetcher implements IFeedFetcher { $item = new Item(); $item->setStatus(0); $item->setUnread(); - $item->setUrl($simplePieItem->get_permalink()); + $item->setUrl(html_entity_decode($simplePieItem->get_permalink(), + ENT_COMPAT, 'UTF-8')); // unescape content because angularjs helps against XSS - $item->setTitle(html_entity_decode($simplePieItem->get_title()), - ENT_COMPAT, 'UTF-8' ); + $item->setTitle(html_entity_decode($simplePieItem->get_title(), + ENT_COMPAT, 'UTF-8')); $guid = $simplePieItem->get_id(); $item->setGuid($guid); $item->setGuidHash(md5($guid));