mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-16 11:19:18 +01:00
Decode HTML entities in tweets.
This commit is contained in:
parent
74fe419659
commit
0827865804
@ -26,6 +26,7 @@
|
||||
#include <qjson/parser.h>
|
||||
|
||||
#include "core/closure.h"
|
||||
#include "core/utilities.h"
|
||||
#include "songinfotextview.h"
|
||||
|
||||
const char* TwitterArtistInfo::kTwitterBucket = "id:twitter";
|
||||
@ -182,7 +183,8 @@ QString GenerateHtmlForTweetStream(const QVariantList& tweets) {
|
||||
int offset = 0;
|
||||
foreach (const Entity& e, entities) {
|
||||
// Write all the plain text up to this entity.
|
||||
writer.writeCharacters(text.mid(offset, e.start_index - offset));
|
||||
writer.writeCharacters(Utilities::DecodeHtmlEntities(
|
||||
text.mid(offset, e.start_index - offset)));
|
||||
// Set the next starting position for reading more plain text.
|
||||
offset = e.end_index;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user