Elmer Fudd 19 Nov, 2002
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);
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?