[TwitterBridge] Fix title includes anchors in plaintext format

The title attribute includes tags (anchors) instead of raw text.
While this works fine in a browser, using a raw format like plain-
text or json breaks with expected behavior.

This commit changes the order in which functions are applied. By re-
moving anchors AFTER fixing the title, the final result does not
include tags and the title is still fixed.

This bug was introduced by d81b61ccfa

References: #546
This commit is contained in:
logmanoriginal 2017-07-05 18:29:11 +02:00
parent ab46af9719
commit d7ff8b9ac7
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ class TwitterBridge extends BridgeAbstract {
// extract tweet timestamp
$item['timestamp'] = $tweet->find('span.js-short-timestamp', 0)->getAttribute('data-time');
// generate the title
$item['title'] = $this->fixAnchorSpacing(strip_tags($tweet->find('p.js-tweet-text', 0), '<a>'));
$item['title'] = strip_tags($this->fixAnchorSpacing($tweet->find('p.js-tweet-text', 0), '<a>'));
$this->processContentLinks($tweet);
$this->processEmojis($tweet);