Fixed Jetspeed RSS Portlet
It sure took a long time for something so simple, but I fixed the RSS portlet to correctly (in my view at least) handle HTML markup in RSS description tags. According to my (brief) research, escaped HTML markup is legal in RSS 0.92 description tags. Jetspeed's NewRSSPortlet class was passing the escaped HTML on to the browser, which printed the HTML code along with the description text on the page. Not cool.
The goal was simple; find the Description tag, and unescape the HTML. It proved more difficult than I'd like to find the Description tag (I ended up processing the entire RSS stream, I think). I also couldn't find an existing HTML unescape method in Jetspeed. The Jakarta commons.lang 2.0 package has one, so I dropped commons.lang 1.0 from my Jetspeed 1.5 source and substituted 2.0. This allowed me to use the StringEscapeUtils.unescapeHtml() method in commons.lang to process the RSS stream before it gets rendered by the portlet.
Now, when you look at the wittle.net home page, you'll see a correctly formatted BLOG session from this blog!.
I've hit the same problem with Jetspeed's NewRSSPortletand a 0.92 RSS feed. Would you be up for sharing your enhancement?
Thanks,
-Kevin
Posted by Kevin on August 02, 2004 at 01:32 AM EDT #