I'm seeing html entities when I hover over the logo image on sites using the Omega 3 theme. Here's what I think is happening.
In line 181 of omega theme's template.php, it creates a linked_logo_image link, running a check_plain on the title of the link:
$vars['linked_logo_img'] = $vars['logo'] ? l($vars['logo_img'], '<front>', array('attributes' => array('rel' => 'home', 'title' => check_plain($vars['site_name'])), 'html' => TRUE)) : '';
However, the l function passes all attributes through drupal_attributes, which also runs a check_plain on the data:
function drupal_attributes(array $attributes = array()) {
foreach ($attributes as $attribute => &$data) {
$data = implode(' ', (array) $data);
$data = $attribute . '="' . check_plain($data) . '"';
}
return $attributes ? ' ' . implode(' ', $attributes) : '';
}
This causes things like quotation marks to be double-encoded in the html, so that when visitors hover over the logo image, they will see for example "Bahá'í" popping up instead of "Bahá'í". I believe the check_plain can just be removed from template.php as per the attached patch, resulting in properly encoded html entities in the page source, and correct titles for the end users.
Comment | File | Size | Author |
---|---|---|---|
omega-3-double-escaped-logo-title-text.patch | 875 bytes | dnotes |