Click to See Complete Forum and Search --> : Should Atom xhtml be escaped and inside <![CDATA


webnick2007
05-13-2010, 01:27 AM
The default implementation of my php template does this but when I view the pages in Firefox, I'm not seeing any text and all the html is escaped and is nested like this:


<entry>
<summary></summary>
<content><![CDATA .....character replaced html here......]</content>
</entry>


shouldn't Atom take un-escaped (non-replaced) special characters and html? What am I doing wrong?

Thanks.

rnd me
05-13-2010, 04:45 PM
shouldn't Atom take un-escaped (non-replaced) special characters and html?


no, atom is xml, and xml needs to be well formed, html doesn't.
Don't foget that a lot of "special characters" are HTML-specific entities, &copy;, &nbsp;, and &quot; for example. these tokens need to be converted to raw xml/unicode entities; substituting the semantic label text for a digit.