With 4.6.1 Drupal is not XHTML 1.0 Valid because drupal_add_link($attributes) function is invalid

This is the actual code (misc/common.inc, line 1868):

function drupal_add_link($attributes) {
  drupal_set_html_head('<link'. drupal_attributes($attributes) .">\n");
}

XHTML 1.0 W3C Valdator warns about erroneous close of
tag

So I fixed the problem adding ' /' at the end of the tag:

function drupal_add_link($attributes) {
  drupal_set_html_head('<link'. drupal_attributes($attributes) ." />\n");
}

And now Drupal is valid XHTML 1.0 code :-)

Hope this will be useful and excuse excuse me by my poor english :-)

How

Comments

Wes Cowley’s picture

It's already been fixed.