Page 1 of 1

XML / RSS: problem with entities - accents ?

Posted: Fri Feb 17, 2006 11:55 am
by fredt
Being a french guy... I'm trying to rss-publish some news containing letters with accents, but I get this in my Tristana reader:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Reference to undefined entity 'eacute'. Error processing resource

Under firefox, when clicking on the orange "XML" button, I get something similar: XML Parsing Error: undefined entity

La loi s'applique aux traitements de données à caractère personnel

I found some other posts, but can't figure how to apply them...

TIA,
FredT

Re: XML / RSS: problem with entities - accents ?

Posted: Sat Feb 18, 2006 3:22 pm
by Ted
The problem with the rss template in 0.11.2 is that it didn't wrap some elements in cdata wrappers.  If you want to quickly solve this problem, open up modules/News/templates/rssfeed.tpl.

In there, you should change the description to be:

Code: Select all

<description><![CDATA[{eval var=$entry->strippedsummary}
                        {eval var=$entry->strippedcontent}]]></description>
That way it'll handle any text that's given to it without fear of it breaking the rss namespaces.  You can do the same for title and category as well.

Hope that helps!

Re: XML / RSS: problem with entities - accents ?

Posted: Sat Feb 18, 2006 9:47 pm
by fredt
Thanks a lot, I succeeded - once I figured you were telling me about second ! I suspected some cdata to be involved, but didn't know where it was...

Still something strange : I'm using this on a test page:
{cms_module module='news' number='5' category='articles' makerssbutton="true"}
to display the button, but I get articles for all news categories... while I have this on another page:
{cms_module module='news' dateformat='%d/%m/%Y' number='20' category='articles' moretext="read article..."}, and it only selects "articles".

Is this "by design"  ::) ?

Thanks a lot for the CDATA thing, anyway... The forum promoted me to Enthusiat: YEEESSSS, I AM!

Re: XML / RSS: problem with entities - accents ?

Posted: Sat Feb 18, 2006 9:49 pm
by Ted
It was more of a design limitation.  However, I fixed it this weekend...  it will use the categories from the first instace of the news module on a page now.

Re: XML / RSS: problem with entities - accents ?

Posted: Sun Feb 19, 2006 9:48 am
by fredt
OK - is it safe for a previously n00b to start playing with fresh code from the Forge? So I could download & start using the current News module ?