The site slogan can contain markup e.g. emphasis or entities. Browsers won't render this when it's contained in the html title tag.
There is already some markup stripping for the $head_title variable, this should include the site_slogan. See patch for details.
| Comment | File | Size | Author |
|---|---|---|---|
| drupal-6.x-strip-slogan.patch | 878 bytes | zany |
Comments
Comment #1
ludovicofischer commentedThis bug hit me too; it generates ugly and invalid HTML if the site slogan contains an anchor or other markup.
As a workaround, I ended up overriding template_preprocess_page with theme_preprocess_page in my in each of my themes' template.php; see http://drupal.org/node/223430.
Comment #2
zany commentedComment #3
nancydruI would suggest that you first update this to 7.x. Second, there really should be a comment in the slogan description text so that they know this will happen.
Comment #4
coltraneI don't think this is a bug, it's a difference of expectation. You're likely to be rendering the site_slogan in your own custom theme so rather than core having to do this (especially since it probably won't get into D6 and D7 has a different template_preprocess_page()) I suggest you implement your own preprocess_page in your theme and replicate what core does while additionally stripping tags. I've submitted a patch for this in Fusion http://drupal.org/node/868572#comment-4350284
Comment #5
zany commentedIt's not about site_slogan but head_title. Core is broken. It's noted that
"$head_title: A modified version of the page title, for use in the TITLE"
but head_title may contain invalid markup. And this gets display in various place in core. I.e.
TL;DR: $head_title must not contain markup as already noted in the docs for the var.
Comment #6
nancydruThis is unlikely to be fixed in D6, especially marked "minor." Does this exist in D7/D8? If so, move this issue to those releases, marked that a D6 back-port is needed.
Comment #7
zany commentedThanks. See D7 issue http://drupal.org/node/1219040