Index: sites/all/modules/contrib/taxonomy_image/taxonomy_image.module =================================================================== --- sites/all/modules/contrib/taxonomy_image/taxonomy_image.module (revision 2292) +++ sites/all/modules/contrib/taxonomy_image/taxonomy_image.module (working copy) @@ -57,14 +57,16 @@ function taxonomy_image_display($tid, $t // Build the link title based on admin choice. // Note: translation must be done here because the cache needs to be language-neutral. + // Have to dump double quotes for attribute. + $current->alt = taxonomy_image_tt("taxonomy:term:$current->tid:name", $current->name); + $current->alt = htmlspecialchars(strip_tags($current->alt), ENT_COMPAT); if ($current->description && !variable_get('taxonomy_image_link_title', 0)) { $current->title = taxonomy_image_tt("taxonomy:term:$current->tid:description", $current->description); + $current->title = htmlspecialchars(strip_tags($current->title), ENT_COMPAT); } else { - $current->title = taxonomy_image_tt("taxonomy:term:$current->tid:name", $current->name); + $current->title = $current->alt; } - // Have to dump double quotes for attribute. - $current->title = htmlspecialchars(strip_tags($current->title), ENT_COMPAT); $my_attrs = array( 'width' => $current->width, @@ -91,13 +93,13 @@ function taxonomy_image_display($tid, $t default: if ($preset == 'ORIGINAL') { - $return_url = theme('image', $current->url, $current->name, $current->title, $attributes, FALSE); + $return_url = theme('image', $current->url, $current->alt, $current->title, $attributes, FALSE); } else { // Make sure the attributes don't try to override the preset. unset($attributes['width'], $attributes['height']); $mypath = variable_get('taxonomy_image_path', 'category_pictures') .'/'; - $return_url = theme('imagecache', $preset, $mypath . $current->path, $current->name, $current->title, $attributes); + $return_url = theme('imagecache', $preset, $mypath . $current->path, $current->alt, $current->title, $attributes); } } if ($wrapper) {