[TwitScoopBridge] Remove less than (<) character from item title (#2034)

This commit is contained in:
Joseph 2021-04-12 18:01:46 +00:00 committed by GitHub
parent 146639ffc9
commit 65be209a47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -106,10 +106,15 @@ 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);
$tweets = str_replace('<', '', $tweets);
$item['title'] = '#' . $number . ' - ' . $name . ' (' . $tweets . ' tweets)';
$item['uri'] = 'https://twitter.com/search?q=' . rawurlencode($name);
if ($tweets === '10K') {
$tweets = 'less than 10K';
}
$item['content'] = <<<EOD
<strong>Rank</strong><br>
<p>{$number}</p>