Elmer Fudd

How is it that this link passed me by until today? Hmmm… Via

Bugger me, this RSS lark is pernickety… I want it to take the full content of my 'blog in the <description> tag, and just the "abstract" field content for articles… but what a palaver. Malformed XML all over the place trying to sure no rogue tags got in there. Originally, I simply had my RSS view do this to any HTML content it came across (excuse the spaces. I don't want the HTML parsing to screw it up, but you get the idea!):

strTo := """ : " >" : " <" : " '" : "  & ";
strFrom := "\"" : ">" : "<" : "'" : "&";
@ReplaceSubstring(FIELD_NAME; strFrom; strTo);

… where FIELD_NAME was the content field I was a-twiddling with. But oh no, it wasn't having any of that…Every now and again, a blog with a perfectly OK URL in it would freak the whole thing out. Solution?

Shove it all in a CDATA island. I wonder if that's allowed?

Comments on this post are now closed.


I’m a software architect / developer / general IT wrangler specialising in web, mobile web and middleware using things like node.js, Java, C#, PHP, HTML5 and more.

Best described as a simpleton, but kindly. You can read more here.