fernandogdj / microblog-purple

Automatically exported from code.google.com/p/microblog-purple
GNU General Public License v3.0
0 stars 0 forks source link

Invalid XML Entities suppress loading of new messages #261

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Sometimes the XML from the Twitter API contains invalid XML entities (I'm not 
sure how this happens, if it's Twitter's fault or the fault of a client 
application). 

The debug log shows:

(16:48:12) twitter: twitter_fetch_new_messages_handler called
(16:48:12) twitter: received result from /1/statuses/home_timeline.xml
(16:48:12) twitter: http_data = #<?xml version="1.0" encoding="UTF-8"?>
<statuses type="array">
[...tons of XML output...]
</statuses>
(16:48:12) twitter: twitter_decode_messages called
(16:48:12) xmlnode: XML parser error for xmlnode 0x7fe749427880: Domain 1, code 
9, level 3: xmlParseCharRef: invalid xmlChar value 8

(full log attached in a file)

Apparently the offending tweet is the last one, from @rettetdieborg, which 
contains a &#8;:
    <text>@ggggilbster &quot;you talking to m&#8;e? YOU talking to me?&quot;</text>

In this case, no tweets can be loaded until the invalid tweet has slided out of 
the window of the tweets to be loaded initially, as given in the config (which 
is especially nasty if this is something about 1000 tweets, as in my case).

Original issue reported on code.google.com by goo...@rohieb.name on 17 Jun 2012 at 3:13

Attachments: