[wp-trac] [WordPress Trac] #32010: get_archives_link breaks HTML5 validation (is in XHTML)

WordPress Trac noreply at wordpress.org
Sat Apr 18 12:59:46 UTC 2015


#32010: get_archives_link breaks HTML5 validation (is in XHTML)
-------------------------+-----------------------------
 Reporter:  conraid      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  4.1.1
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 get_archives_link in file wp_includes/general-template.php unconditionally
 ends link tag with '/>' which breaks page validation for HTML5 documents,
 like default theme and all recent themes.

 It's in XHTML syntax, with /> final.

 {{{
         if ('link' == $format)
                 $link_html = "\t<link rel='archives' title='" . esc_attr(
 $text ) . "' href='$url' />\n";
 }}}



 You could put a condition to choose html or xhtml, or, at this point,
 putting the default html.

 {{{
         if ('link' == $format)
                 $link_html = "\t<link rel='archives' title='" . esc_attr(
 $text ) . "' href='$url'>\n";
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32010>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list