[wp-trac] [WordPress Trac] #9992: Atom feed titles are CDATA'ed and XML encoded.

WordPress Trac wp-trac at lists.automattic.com
Sat May 15 11:33:19 UTC 2010


#9992: Atom feed titles are CDATA'ed and XML encoded.
-------------------------------------------------------------+--------------
 Reporter:  pm24601                                          |        Owner:  josephscott
     Type:  defect (bug)                                     |       Status:  closed     
 Priority:  normal                                           |    Milestone:  Unassigned 
Component:  Feeds                                            |      Version:  2.7.1      
 Severity:  normal                                           |   Resolution:  invalid    
 Keywords:  has-patch tested reporter-feedback dev-feedback  |  
-------------------------------------------------------------+--------------
Changes (by markjaquith):

  * status:  reopened => closed
  * resolution:  => invalid
  * milestone:  3.0 => Unassigned


Comment:

 jarrettc — after consulting both the XML and the Atom specs, I've
 determined that while what WordPress is doing here is unorthodox and
 likely redundant, it isn't incorrect and '''it is not double-encoding'''
 in the context of Atom.

 CDATA acts as a passthrough. Everything inside is passed through.
 {{{Johnson & Johnson}}} comes out as {{{Johnson & Johnson}}}. That
 would be an issue if this were just XML. It is Atom, so from here, we have
 to look to the Atom spec.

 I quote:

 > If type="html", then this element contains entity escaped html.

 Thus, if type="html", Atom sees {{{Johnson & Johnson}}} as {{{Johnson
 & Johnson}}}. If type were "text," then we'd have the problem of Atom
 seeing it as {{{Johnson  & Johnson}}} (which is the mistake that
 peacablewhale's patch makes).

 No feed parsing clients that I tested have any problem with WordPress'
 current feeds. However unorthodox, it doesn't violate the specs that I can
 tell, it doesn't get flagged in any validator, and it works in all tested
 feed parsers. Consequently, I'm closing as invalid.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9992#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list