[TwitScoopBridge] Fix encoding of less than character (<) (#2023)

This commit is contained in:
Joseph 2021-03-21 06:39:01 +00:00 committed by GitHub
parent 9e6f063cfd
commit a6c0874b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -106,11 +106,12 @@ class TwitScoopBridge extends BridgeAbstract {
$name = rtrim($li->find('span.trend.name', 0)->plaintext, '&nbsp');
$tweets = str_replace(' tweets', '', $li->find('span.tweets', 0)->plaintext);
$tweets = str_replace('<', '&lt;', $tweets);
$item['title'] = '#' . $number . ' - ' . $name . ' - ' . htmlentities($tweets) . ' tweets';
$item['title'] = '#' . $number . ' - ' . $name . ' (' . $tweets . ' tweets)';
$item['uri'] = 'https://twitter.com/search?q=' . rawurlencode($name);
$item['content'] = <<<EOD
<Strong>Rank</strong><br>
<strong>Rank</strong><br>
<p>{$number}</p>
<Strong>Topic</strong><br>
<p>{$name}</p>