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.

CommentFileSizeAuthor
drupal-6.x-strip-slogan.patch878 byteszany

Comments

ludovicofischer’s picture

Version: 6.6 » 6.9

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

zany’s picture

Version: 6.9 » 6.10
nancydru’s picture

Status: Active » Needs work

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

coltrane’s picture

Status: Needs work » Closed (won't fix)

I 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

zany’s picture

Version: 6.10 » 6.22
Status: Closed (won't fix) » Active

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

modules/system/page.tpl.php:  <title><?php print $head_title; ?></title>
themes/bluemarine/page.tpl.php:  <title><?php print $head_title ?></title>
themes/garland/maintenance-page.tpl.php:    <title><?php print $head_title ?></title>
themes/garland/page.tpl.php:    <title><?php print $head_title ?></title>
themes/pushbutton/page.tpl.php:  <title><?php print $head_title ?></title>

For reference, the note:
modules/system/page.tpl.php: * - $head_title: A modified version of the page title, for use in the TITLE

and the possible addition of invalid markup to $head_title:
includes/theme.inc:      $head_title[] = variable_get('site_slogan', '');
includes/theme.maintenance.inc:      $head_title[] = variable_get('site_slogan', '');

TL;DR: $head_title must not contain markup as already noted in the docs for the var.

nancydru’s picture

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

zany’s picture

Thanks. See D7 issue http://drupal.org/node/1219040

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.