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 node-related data.
*/
use Drupal\Component\Utility\SafeMarkup;
use Drupal\Component\Utility\Html;
use Drupal\Core\Datetime\Entity\DateFormat;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Render\BubbleableMetadata;
@ -116,16 +116,16 @@ function node_tokens($type, $tokens, array $data, array $options, BubbleableMeta
break;
case 'type':
$replacements[$original] = $sanitize ? SafeMarkup::checkPlain($node->getType()) : $node->getType();
$replacements[$original] = $sanitize ? Html::escape($node->getType()) : $node->getType();
break;
case 'type-name':
$type_name = node_get_type_label($node);
$replacements[$original] = $sanitize ? SafeMarkup::checkPlain($type_name) : $type_name;
$replacements[$original] = $sanitize ? Html::escape($type_name) : $type_name;
break;
case 'title':
$replacements[$original] = $sanitize ? SafeMarkup::checkPlain($node->getTitle()) : $node->getTitle();
$replacements[$original] = $sanitize ? Html::escape($node->getTitle()) : $node->getTitle();
break;
case 'body':
@ -164,7 +164,7 @@ function node_tokens($type, $tokens, array $data, array $options, BubbleableMeta
break;
case 'langcode':
$replacements[$original] = $sanitize ? SafeMarkup::checkPlain($node->language()->getId()) : $node->language()->getId();
$replacements[$original] = $sanitize ? Html::escape($node->language()->getId()) : $node->language()->getId();
break;
case 'url':
@ -179,7 +179,7 @@ function node_tokens($type, $tokens, array $data, array $options, BubbleableMeta
case 'author':
$account = $node->getOwner() ? $node->getOwner() : User::load(0);
$bubbleable_metadata->addCacheableDependency($account);
$replacements[$original] = $sanitize ? SafeMarkup::checkPlain($account->label()) : $account->label();
$replacements[$original] = $sanitize ? Html::escape($account->label()) : $account->label();
break;
case 'created':