summaryrefslogtreecommitdiffstats
path: root/fetcher
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2015-11-02 20:52:56 +0100
committerAlessandro Cosentino <cosenal@gmail.com>2015-11-02 20:52:56 +0100
commite970ca9328a9485d83c4804973ac98d93f93b523 (patch)
tree0a67f1acb529385483e79d5e390fadc2f7206e8f /fetcher
parent1f3312a0779dd658be555285f3cc208d2e5156bf (diff)
apos is handled by html_decode since php 5.4.0
Diffstat (limited to 'fetcher')
-rw-r--r--fetcher/feedfetcher.php12
1 files changed, 4 insertions, 8 deletions
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! &apos; is not converted by PHP that's why we need to do it
- // manually (TM)
- return str_replace('&apos;', '\'',
+ 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'
);
}