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

basicmagic.net’s picture

nice 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

Steven’s picture

XHTML recommends a space before the slash to not confuse non-XHTML browsers... fixed in HEAD / 4.6.

axbom’s picture

Thanx. 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

<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.axbom.se/index.rdf" />

or

<link rel="alternate" type="application/rss+xml" title="RSS" href="http://www.axbom.se/blog/feed/1" />

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....

Steven’s picture

If 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.

gregoryo’s picture

Agree with fixing this bug in HEAD.
Invalid XHTML in the document head within the link rel tag is a problem.

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Kjartan’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)