Miranda NG Official Community Forum
Forum for English speaking Miranda NG users => Bug reports => Topic started by: omniwolf on 27 07 2015, 01:46:50
-
Hi again
Recently i've noticed that the twitter client is not displaying "<" or ">" correctly in the twitter feed. instead it displays "<" or ">".
This happened previously with the "&" character, and when i was maintaining the protocol i had to "fix" this as you can see here:
https://github.com/miranda-ng/miranda-ng/blob/master/protocols/Twitter/src/twitter.cpp#L243
and here:
https://github.com/miranda-ng/miranda-ng/blob/master/protocols/Twitter/src/twitter.cpp#L252
So you'd have to put somewhere around line 263 (above the push_back(u) call):
// ok here i'm trying some way to fix all the ">" and "<" things that are showing up
// i dunno why it's happening, so i'll just find and replace each occurance :/
std::string rawText = u.status.text;
for (size_t pos = 0; (pos = rawText.find("<", pos)) != std::string::npos; pos++)
rawText.replace(pos, 4, "<");
for (size_t pos = 0; (pos = rawText.find(">", pos)) != std::string::npos; pos++)
rawText.replace(pos, 4, ">");
u.status.text = rawText;
-
Done :-) http://trac.miranda-ng.org/changeset/14734/
-
much neater, thank you :)