This post breaks the RSS code. January 4, 2006 6:54 AM   Subscribe

The MeFi RSS code escapes the ampersand in this post. It shouldn't.
posted by cillit bang to Bugs at 6:54 AM (6 comments total)

It's tough to tell when ampersands need to be escaped and when they are the escape. But isn't escaping inside CDATA redundant?
posted by Plutor at 8:01 AM on January 4, 2006


It's not tough, Plutor; it's pretty trivial to test for whether the ampersand appears as part of an HTML entity or as a standalone. But you're right that the point of CDATA sections is to unambiguously state that the contained text is vehemently NOT markup, so you don't have to escape anything within them (if I'm recalling correctly).
posted by delfuego at 8:33 AM on January 4, 2006


The person writing the post most likely input the british pound symbols as their entity (I see them as an ampersand-starting entity value when I view source on the page). The rss feed doesn't transform those kinds of characters, so I'm pretty sure it wasn't due to a problem on my end.
posted by mathowie (staff) at 8:45 AM on January 4, 2006


Your code escaped the ampersand at the start of their pound escaping.
posted by cillit bang at 9:40 AM on January 4, 2006


A snippet from the front page source:


A snippet from the RSS feed:


Note the extra "amp;".
posted by cillit bang at 1:54 PM on January 4, 2006


Yeah, Matt, I think this one's in the MeFi RSS code -- the source definitely seems to transform (ampersand character changed to @ to prevent munging) the @#0163; to @amp#0163;.
posted by delfuego at 3:03 PM on January 4, 2006


« Older 'otherwise you're no better than any other date...   |   Marking a question to check back on it Newer »

You are not logged in, either login or create an account to post comments