Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
includes/common.inc:
line 1872: drupal_set_html_head('<link'. drupal_attributes($attributes) .">\n");
does not include the trailing / required to be XHTML/strict.
This is fixed by changing it to:
line 1872: drupal_set_html_head('<link'. drupal_attributes($attributes) ."/>\n");
With this change it validates perfectly.
Comments
Comment #1
basicmagic.net CreditAttribution: basicmagic.net commentednice one, lewiz- thanks.
i am a big fan of the strict validation- and i wondered why this was
the only thing getting flagged by the validator... this is the fix!
vincent
Comment #2
Steven CreditAttribution: Steven commentedXHTML recommends a space before the slash to not confuse non-XHTML browsers... fixed in HEAD / 4.6.
Comment #3
axbom CreditAttribution: axbom commentedThanx. I was really concerned about this. Simple fix, easy to find.
One thing, though, is that I'm not too happy with drupal adding these headers automagically. The reason being that i use .htaccess rewrite rules to make my feed look like "sitename.com/index.rdf", which I think is a nicer URL for the feed and this is the URL I'd like to put in the head section. Also, on one of my site I only want to offer the feed for my blog on the front page, and not the feed for the entire site.
So I'd like
or
Previously I put these headers in my templates, but where are the headers in fact set?
I realise I should probably post this dilemma elsewhere....
Comment #4
Steven CreditAttribution: Steven commentedIf you set up an URL alias "index.rdf" for "blog/feed/1", then this is what Drupal will use in the header.
There is currently no option for enabling/disabling certain feeds. Perhaps you could submit a feature request.
Comment #5
gregoryo CreditAttribution: gregoryo commentedAgree with fixing this bug in HEAD.
Invalid XHTML in the document head within the link rel tag is a problem.
Comment #6
(not verified) CreditAttribution: commentedComment #7
(not verified) CreditAttribution: commentedComment #8
(not verified) CreditAttribution: commentedComment #9
Kjartan CreditAttribution: Kjartan commentedComment #10
(not verified) CreditAttribution: commentedComment #11
(not verified) CreditAttribution: commentedComment #12
(not verified) CreditAttribution: commentedComment #13
(not verified) CreditAttribution: commented