Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023

This commit is contained in:
Pantheon Automation 2015-09-04 13:20:09 -07:00 committed by Greg Anderson
parent 2720a9ec4b
commit f3791f1da3
1898 changed files with 54300 additions and 11481 deletions

View file

@ -5,7 +5,7 @@
* Builds placeholder replacement tokens for taxonomy terms and vocabularies.
*/
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\Xss;
use Drupal\Core\Render\BubbleableMetadata;
use Drupal\taxonomy\Entity\Vocabulary;
@ -109,7 +109,7 @@ function taxonomy_tokens($type, $tokens, array $data, array $options, Bubbleable
break;
case 'name':
$replacements[$original] = $sanitize ? SafeMarkup::checkPlain($term->getName()) : $term->getName();
$replacements[$original] = $sanitize ? Html::escape($term->getName()) : $term->getName();
break;
case 'description':
@ -131,14 +131,14 @@ function taxonomy_tokens($type, $tokens, array $data, array $options, Bubbleable
case 'vocabulary':
$vocabulary = Vocabulary::load($term->bundle());
$bubbleable_metadata->addCacheableDependency($vocabulary);
$replacements[$original] = SafeMarkup::checkPlain($vocabulary->label());
$replacements[$original] = Html::escape($vocabulary->label());
break;
case 'parent':
if ($parents = $taxonomy_storage->loadParents($term->id())) {
$parent = array_pop($parents);
$bubbleable_metadata->addCacheableDependency($parent);
$replacements[$original] = SafeMarkup::checkPlain($parent->getName());
$replacements[$original] = Html::escape($parent->getName());
}
break;
}
@ -165,7 +165,7 @@ function taxonomy_tokens($type, $tokens, array $data, array $options, Bubbleable
break;
case 'name':
$replacements[$original] = $sanitize ? SafeMarkup::checkPlain($vocabulary->label()) : $vocabulary->label();
$replacements[$original] = $sanitize ? Html::escape($vocabulary->label()) : $vocabulary->label();
break;
case 'description':