[wp-trac] Re: [WordPress Trac] #1526: have wp-atom.php generate Atom 1.0 (fix attached)

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 11 22:16:49 GMT 2006

#1526: have wp-atom.php generate Atom 1.0 (fix attached)
 Reporter:  comatoast                     |        Owner:  markjaquith
     Type:  enhancement                   |       Status:  assigned   
 Priority:  normal                        |    Milestone:  2.1        
Component:  General                       |      Version:  2.0.2      
 Severity:  normal                        |   Resolution:             
 Keywords:  bg|has-patch bg|dev-feedback  |  
Comment (by C960657):

 I'm no Atom expert, but I doubt that you can specify type="xhtml" and then
 use CDATA to hide invalid HTML. Either it is XHTML or it's not.

 Assume you have a post whose body is "Peter & '''Mary'''" (without the
 quotes), i.e. the HTML source is "<p>Peter &amp; <b>Mary</b></p>". This
 can be included in an Atom feed in (at least) three ways:

 <content type="xhtml">
   <div xmlns="http://www.w3.org/1999/xhtml">
     <p>Peter &amp; <b>Mary</b></p>
 (the XHTML namespace may be specified in other ways)

 <content type="html">
   &lt;p&gt;Peter &amp;amp; &lt;b&gt;Mary&lt;/b&gt;&lt;/p&gt;

 <content type="text">Peter &amp; Mary</content>

 The two first methods both represent the same information. The last
 represents the unformatted text.

 I suggest using type="html".

 The type="xhtml" method is only suitable, if the body is guaranteed to be
 valid XHTML.

 With type="text" the formatting must unnecessarily be left out. Converting
 HTML to a meaningful unformatted string is hard and sometimes impossible.

Ticket URL: <http://trac.wordpress.org/ticket/1526>
WordPress Trac <http://wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list