From f05bd15393bf0e272b9afc2251aab1a0301343f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Fri, 8 Jul 2016 16:11:57 +0200 Subject: [PATCH] TwitterBridge*: fix HTML entities in title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/TwitterBridge.php | 2 +- bridges/TwitterBridgeClean.php | 2 +- bridges/TwitterBridgeCleanExtended.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/TwitterBridge.php b/bridges/TwitterBridge.php index ac3383ff..c116713e 100644 --- a/bridges/TwitterBridge.php +++ b/bridges/TwitterBridge.php @@ -65,7 +65,7 @@ class TwitterBridge extends BridgeAbstract{ $link->removeAttribute('title'); } $item->content = str_replace('href="/', 'href="https://twitter.com/', strip_tags($tweet->find('p.js-tweet-text', 0)->innertext, '')); // extract tweet text - $item->title = $item->fullname . ' (@' . $item->username . ') | ' . strip_tags($item->content); + $item->title = $item->fullname . ' (@' . $item->username . ') | ' . html_entity_decode(strip_tags($item->content),ENT_QUOTES,'UTF-8'); $this->items[] = $item; } } diff --git a/bridges/TwitterBridgeClean.php b/bridges/TwitterBridgeClean.php index e98b0067..9f6ccfcd 100644 --- a/bridges/TwitterBridgeClean.php +++ b/bridges/TwitterBridgeClean.php @@ -66,7 +66,7 @@ class TwitterBridgeClean extends BridgeAbstract{ $link->removeAttribute('dir'); } $item->content = str_replace('pic.twitter.com', 'https://pic.twitter.com', strip_tags($tweet->find('p.js-tweet-text', 0)->innertext)); // extract tweet text - $item->title = $item->content; + $item->title = html_entity_decode($item->content,ENT_QUOTES,'UTF-8'); $this->items[] = $item; } } diff --git a/bridges/TwitterBridgeCleanExtended.php b/bridges/TwitterBridgeCleanExtended.php index 7d2d60b5..170efff9 100644 --- a/bridges/TwitterBridgeCleanExtended.php +++ b/bridges/TwitterBridgeCleanExtended.php @@ -71,7 +71,7 @@ class TwitterBridgeCleanExtended extends BridgeAbstract{ $item->content = '♻ @' . $item->username . ': ' . $item->content; } } - $item->title = $item->content; + $item->title = html_entity_decode($item->content,ENT_QUOTES,'UTF-8'); $this->items[] = $item; } }