[wp-trac] [WordPress Trac] #33591: Media File Missing Length Causes Wordpress Atom Feed to Be Invalid

WordPress Trac noreply at wordpress.org
Tue Sep 19 15:25:56 UTC 2017


#33591: Media File Missing Length Causes Wordpress Atom Feed to Be Invalid
-------------------------------------------------+-------------------------
 Reporter:  jonnybot                             |       Owner:
     Type:  defect (bug)                         |  stevenkword
 Priority:  normal                               |      Status:  assigned
Component:  Feeds                                |   Milestone:  Future
 Severity:  normal                               |  Release
 Keywords:  good-first-bug has-patch has-unit-   |     Version:  4.2.4
  tests                                          |  Resolution:
                                                 |     Focuses:
                                                 |  administration
-------------------------------------------------+-------------------------
Changes (by birgire):

 * keywords:  good-first-bug has-patch => good-first-bug has-patch has-unit-
     tests


Comment:

 In [attachment:33591.6.patch] we try to extend the {{{url, {{{length and
 {{{type parsing to support these variations:

 {{{
 url
 length
 type

 url
 length

 url
 type

 url

 }}}

 '''Few notes:
 '''

 - I found this recommendation for the enclosure tag:
 [http://www.rssboard.org/rss-profile "When an enclosure's size cannot be
 determined, a publisher SHOULD use a length of 0."] I wonder if the same
 goes for the link tag here? In the patch we use 0 as the default
 {{{length}}}.

 - I'm also wondering if the link tag attributes can have single quotes,
 like WordPress uses for the stylesheets? We use double quotes here.

 - Should the link tags be removed for empty {{{url}}} attributes? Here we
 allow empty ones.

 - I assume the {{{type}}} attribute can be empty?


 Tests are included.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33591#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list