Forums / Setup & design / Avoid HTML entity encoding in Feed Export Description

Avoid HTML entity encoding in Feed Export Description

Author Message

Thomas Parisot

Friday 03 June 2011 2:20:12 am

Hello everybody,

I export blog posts as RSS feed with eZ Publish and it works great.
However I encounter a subtle problem: I assed an XML Text attribute to the item description and eZ outputs it as encoded entities.

Wouldn't it better to wrap the description with CDATA + plain HTML? Or is there a way to make this working this way?

Thanks a lot :) 

Brandon Chambers

Friday 03 June 2011 9:35:33 am

Can you paste your result and what you're expecting? Also

 

Your right, HTML in XML is a no-no unless using the CDATA tag. This might be a bug?

http://www.w3schools.com/xml/xml_cdata.asp

Check out the bugs that have to do with RSS:

http://issues.ez.no/IssueList.php?Search=rss&SearchIn=3

 

Hope this helps!

Brandon Chambers
brandon@granitehorizon.com
blog: http://blog.divdesigns.com
Granite Horizon / http://granitehorizon.com

Thomas Parisot

Monday 06 June 2011 12:42:53 am

Thanks for your reply Brandon.

You can figure it out at: http://bordeaux-winetour.fr/rss/feed/blog

I'd like to have items descriptions as CDATA + plain HTML (rather than entity encoded) to ease the feed importing in other systems (like planet).

I would prefer to use the bundled feed rather than doing my own templates/module to achieve that simple goal.

Thanks for your help :)

Thomas Parisot

Wednesday 08 June 2011 4:10:38 am

I've found what caused trouble: it's related the way the feed is built.

By assigning HTML to a DomNode->nodeValue, it's entity encoded to fit in a string.
The only way I found was to create a documentFragment, assign the HTML with the asXML method and append the fragment to the DomNode.

No clean way to do that either ;-(