diff --git a/modules/taxonomy/taxonomy-term.tpl.php b/modules/taxonomy/taxonomy-term.tpl.php index a225c3a..eebdb7a 100644 --- a/modules/taxonomy/taxonomy-term.tpl.php +++ b/modules/taxonomy/taxonomy-term.tpl.php @@ -5,8 +5,7 @@ * Default theme implementation to display a term. * * Available variables: - * - $name: (deprecated) The unsanitized name of the term. Use $term_name - * instead. + * - $name: (deprecated) The name of the term. Use $term_name instead. * - $content: An array of items for the content of the term (fields and * description). Use render($content) to print them all, or print a subset * such as render($content['field_example']). Use diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 9be7dfc..28b365c 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -908,6 +908,9 @@ function template_preprocess_taxonomy_term(&$variables) { // Flatten the term object's member fields. $variables = array_merge((array) $term, $variables); + // Make sure the $name variable is sanitized (like $term_name already is). + $variables['name'] = $variables['term_name']; + // Helpful $content variable for templates. $variables['content'] = array(); foreach (element_children($variables['elements']) as $key) {