From eac8eca7a35fedb899312424d518f3b75269bad7 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 25 Jul 2013 00:43:00 +0200 Subject: clean up indention --- utility/feedfetcher.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'utility') diff --git a/utility/feedfetcher.php b/utility/feedfetcher.php index c3568ab63..217723d83 100644 --- a/utility/feedfetcher.php +++ b/utility/feedfetcher.php @@ -115,11 +115,12 @@ class FeedFetcher implements IFeedFetcher { $item = new Item(); $item->setStatus(0); $item->setUnread(); - $item->setUrl(html_entity_decode($simplePieItem->get_permalink(), - ENT_COMPAT, 'UTF-8')); + $item->setUrl( + html_entity_decode($simplePieItem->get_permalink(), ENT_COMPAT, 'UTF-8') + ); + // unescape content because angularjs helps against XSS - // unescape again to clean up fucktard's RSS feeds who escape twice - // (I'm looking at you slashdot) + // unescape again to clean up stuff that was escaped $item->setTitle( html_entity_decode( html_entity_decode($simplePieItem->get_title(), ENT_COMPAT, 'UTF-8'), @@ -128,9 +129,15 @@ class FeedFetcher implements IFeedFetcher { $guid = $simplePieItem->get_id(); $item->setGuid($guid); $item->setGuidHash(md5($guid)); - $item->setBody(str_replace('purifier->purify($simplePieItem->get_content()))); + + // links should always open in a new window + $item->setBody( + str_replace( + 'purifier->purify( + $simplePieItem->get_content() + ) + ) + ); // pubdate is not required. if not given use the current date $date = $simplePieItem->get_date('U'); -- cgit v1.2.3