Commit b8ef984e authored by catch's avatar catch
Browse files

Issue #1555294 by Pol, tim.plunkett, cristinawithout, gagarine: Fixed...

Issue #1555294 by Pol, tim.plunkett, cristinawithout, gagarine: Fixed Vocabulary title HTML entities are double encoded.
parent 070ad586
......@@ -63,6 +63,17 @@ function testVocabularyInterface() {
$edit['machine_name'] = '!&^%';
$this->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
$this->assertText(t('The machine-readable name must contain only lowercase letters, numbers, and underscores.'));
// Ensure that vocabulary titles are escaped properly.
$edit = array();
$edit['name'] = 'Don\'t Panic';
$edit['description'] = $this->randomName();
$edit['machine_name'] = 'don_t_panic';
$this->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
$site_name = config('system.site')->get('name');
$this->assertTitle(t('Don\'t Panic | @site-name', array('@site-name' => $site_name)));
$this->assertNoTitle(t('Don't Panic | @site-name', array('@site-name' => $site_name)));
}
/**
......
......@@ -356,7 +356,7 @@ function taxonomy_menu() {
);
$items['admin/structure/taxonomy/%taxonomy_vocabulary_machine_name'] = array(
'title callback' => 'taxonomy_admin_vocabulary_title_callback',
'title callback' => 'entity_page_label',
'title arguments' => array(3),
'page callback' => 'drupal_get_form',
'page arguments' => array('taxonomy_overview_terms', 3),
......@@ -427,13 +427,6 @@ function taxonomy_term_access($op, $term) {
return user_access("$op terms in $term->vid") || user_access('administer taxonomy');
}
/**
* Return the vocabulary name given the vocabulary object.
*/
function taxonomy_admin_vocabulary_title_callback(Vocabulary $vocabulary) {
return $vocabulary->name;
}
/**
* Saves a vocabulary.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment