jgoerzen / twidge

Command-line twitter/identica client [Haskell]
http://wiki.github.com/jgoerzen/twidge/
GNU General Public License v2.0
220 stars 29 forks source link

Angle brackets displayed as < and > #1

Closed jgoerzen closed 14 years ago

jgoerzen commented 14 years ago

From http://software.complete.org/software/issues/show/118:

Added by Robin Green 2008-12-08. ALL BELOW TEXT BY ROBIN GREEN:

The angle brackets in these tweets are displayed as &lt; and &gt; instead of < and >.

              Hacking on Twidge <http://is.gd/aCvV> some more -
                       if this works, it should now stop including angle
                       brackets in URLs when shorteni ...
              Hacking on Twidge <http://is.gd/aCvV> some more -
                       if this works, it should now stop including angle
                       brackets in URLs when shorteni ...

They appear OK on twitter.com. These tweets were made with Twidge. NOTE: The tweet truncation is a bug in Twitter - which I have reported to the Twitter API bug tracker - not a bug in Twidge.


There is some more information about this issue in a reply I received to a different bug report filed against the Twitter API:

http://code.google.com/p/twitter-api/issues/detail?id=184#c8

The relevant paragraph is:

"So, the encoding on the above status is in keeping with what we've done for ages. It's a bit odd, I agree, but it's given us the broadest range of defense against web vulnerabilities."

So, basically, this escaping is a hack from the twitter team, which has to be reversed in order to display angle brackets correctly. Stupid, in my opinion, but looks like we'll have to deal with it.

jgoerzen commented 14 years ago

Handle < and > in twitter updates.

Closed by 3f40f6d785c5333714b5d3359c75be82526c351a

Twitter has special handling and extra escaping of < and >. twidge already handled other entity escapes correctly.