Skip to content

Commit

Permalink
[TwitScoopBridge] Remove less than (<) character from item title (#2034)
Browse files Browse the repository at this point in the history
  • Loading branch information
VerifiedJoseph authored Apr 12, 2021
1 parent 146639f commit 65be209
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bridges/TwitScoopBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,15 @@ public function collectData() {

$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>
Expand Down

0 comments on commit 65be209

Please sign in to comment.