From e970ca9328a9485d83c4804973ac98d93f93b523 Mon Sep 17 00:00:00 2001 From: Alessandro Cosentino Date: Mon, 2 Nov 2015 20:52:56 +0100 Subject: apos is handled by html_decode since php 5.4.0 --- fetcher/feedfetcher.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'fetcher') diff --git a/fetcher/feedfetcher.php b/fetcher/feedfetcher.php index 60bb404df..6b7460679 100644 --- a/fetcher/feedfetcher.php +++ b/fetcher/feedfetcher.php @@ -140,15 +140,11 @@ class FeedFetcher implements IFeedFetcher { private function decodeTwice($string) { - // behold! ' is not converted by PHP that's why we need to do it - // manually (TM) - return str_replace(''', '\'', + return html_entity_decode( html_entity_decode( - html_entity_decode( - $string, ENT_QUOTES, 'UTF-8' - ), - ENT_QUOTES, 'UTF-8' - ) + $string, ENT_QUOTES | ENT_HTML5, 'UTF-8' + ), + ENT_QUOTES | ENT_HTML5, 'UTF-8' ); } -- cgit v1.2.3