Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Dec 2009 at 18:51 UTC
Updated:
15 Mar 2010 at 10:40 UTC
Jump to comment: Most recent file
When you use drupal_add_link(), it adds an extra newline before passing the data to drupal_set_html_head(). The problem is that drupal_set_html_head() *also* adds a newline to each output. So if you use drupal_add_link(), you get output like:
<link href="http://mysql.drupal6dev.local/opensearch/node" title="mysql.drupal6dev.local node search" rel="search" type="application/opensearchdescription+xml" />
<link href="http://mysql.drupal6dev.local/opensearch/user" title="mysql.drupal6dev.local user search" rel="search" type="application/opensearchdescription+xml" />
<link href="http://mysql.drupal6dev.local/opensearch/advanced_help" title="mysql.drupal6dev.local advanced_help search" rel="search" type="application/opensearchdescription+xml" />
<link href="http://mysql.drupal6dev.local/opensearch/location" title="mysql.drupal6dev.local location search" rel="search" type="application/opensearchdescription+xml" />
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 668714-drupaladdlink-newline-D6.patch | 589 bytes | boombatower |
| #2 | 668714-drupaladdlink-newline-D6.patch | 625 bytes | dave reid |
Comments
Comment #1
dave reidYou can even see the result in the source code of drupal.org's frontpage:
Comment #2
dave reidOne-line fix patch attached for review.
Comment #3
boombatower commentedMight as well change " to ' while we are there since no more \n.
Comment #4
dave reidGood point. Thanks!
Comment #5
gábor hojtsyNot applicable to D7?
Comment #6
dave reidIt's already been fixed in D7 otherwise I would have filed it there first. :)
Comment #7
gábor hojtsyGreat, thanks. Committed to Drupal 6.