Issue #1555294 by Pol, tim.plunkett, cristinawithout, gagarine: Fixed Vocabulary title HTML entities are double encoded.
parent
070ad58626
commit
b8ef984e94
|
@ -63,6 +63,17 @@ class VocabularyTest extends TaxonomyTestBase {
|
||||||
$edit['machine_name'] = '!&^%';
|
$edit['machine_name'] = '!&^%';
|
||||||
$this->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
|
$this->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
|
||||||
$this->assertText(t('The machine-readable name must contain only lowercase letters, numbers, and underscores.'));
|
$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(
|
$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),
|
'title arguments' => array(3),
|
||||||
'page callback' => 'drupal_get_form',
|
'page callback' => 'drupal_get_form',
|
||||||
'page arguments' => array('taxonomy_overview_terms', 3),
|
'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 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.
|
* Saves a vocabulary.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue