From 5cd54cbad6937c21a4a163a040f264c419abd367 Mon Sep 17 00:00:00 2001
From: Pol Dell'Aiera <Pol@47194.no-reply.drupal.org>
Date: Tue, 5 Jun 2012 20:21:27 +0200
Subject: [PATCH] 1555294: Vocabulary title HTML entities are double encoded

---
 modules/taxonomy/taxonomy.module |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index ee12be7..dcc356f 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -323,7 +323,7 @@ function taxonomy_menu() {
   );
 
   $items['admin/structure/taxonomy/%taxonomy_vocabulary_machine_name'] = array(
-    'title callback' => 'taxonomy_admin_vocabulary_title_callback',
+    'title callback' => 'taxonomy_vocabulary_title_callback',
     'title arguments' => array(3),
     'page callback' => 'drupal_get_form',
     'page arguments' => array('taxonomy_overview_terms', 3),
@@ -375,7 +375,26 @@ function taxonomy_term_edit_access($term) {
 }
 
 /**
- * Return the vocabulary name given the vocabulary object.
+ * Returns the name of a vocabulary.
+ *
+ * Title callback for the editing pages for taxonomy admin pages.
+ *
+ * @param $vocabulary
+ *   An object representing the vocabulary, as returned by
+ *   taxonomy_vocabulary_load().
+ */
+function taxonomy_vocabulary_title_callback($vocabulary) {
+  return $vocabulary->name;
+}
+
+/**
+ * Returns the sanitized name of a vocabulary.
+ *
+ * Deprecated. This function was previously used as a menu item title callback
+ * but has been replaced by taxonomy_vocabulary_title_callback() (which does not
+ * sanitize the title, since the menu system does that automatically). In
+ * Drupal 7, use that function for title callbacks, and call check_plain()
+ * directly if you need a sanitized title.
  */
 function taxonomy_admin_vocabulary_title_callback($vocabulary) {
   return check_plain($vocabulary->name);
-- 
1.7.3.4

