1

The following Atom feed has invalid characters, and is making my reader app crash because the XML library cannot parse it:

https://stackoverflow.com/feeds/tag/windows-8.1%20OR%20windows-store-apps%20OR%20windows-8%20OR%20windows-phone-8%20OR%20windows-runtime

Feeds change too fast, so by the time you see this report the feed may not be invalid anymore, so I am copying the feed here:

https://skydrive.live.com/redir?resid=63207E51377958A9!12583&authkey=!ALmX1rIbGv-bais&ithint=file%2c.xml

This is not the first time I've seen an invalid feed.

The problem is that there are multiple 0x1E bytes, the first one is in line 121 character 48, or byte 7104.

That is the <summary> of this question:

System.InvalidCast exception Windows Runtime

So any Atom feed containing that question is invalid.

  • 1
    I'm taking a look at this now. – Haney Jun 27 '14 at 15:11
3

You're right, U+001E is not a valid character in XML 1.0, which the SO Atom feed claims to be. The same goes for all other C0 control characters too, except for TAB (U+0009), LF (U+000A) and CR (U+000D).

Those characters are valid in XML 1.1, as long as they're encoded as entity literals (e.g. &#x1E;). However, given that they have no obvious use in an Atom feed, it would probably be better to just filter them out.

2

Thanks for bringing this up. I have resolved it by retroactively sanitizing the Question/Answer data that is used in the feeds, and installing mechanisms to prevent future invalid characters from being input. This will be live in the next release (> rev 2014.6.27.2348)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .