diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php index 41e2976..3eef192 100644 --- a/core/modules/views/src/Plugin/views/PluginBase.php +++ b/core/modules/views/src/Plugin/views/PluginBase.php @@ -294,8 +294,7 @@ public function globalTokenReplace($string = '', array $options = array()) { /** * Replaces Views' tokens in a given string. It is the responsibility of the - * calling function to sanitize $text and $token replacements are sanitized - * before being used in output. + * calling function to ensure $text and $token replacements are sanitized. * * This used to be a simple strtr() scattered throughout the code. Some Views * tokens, such as arguments (e.g.: %1 or !1), still use the old format so we @@ -308,12 +307,13 @@ public function globalTokenReplace($string = '', array $options = array()) { * * @return String */ - public function viewsTokenReplace($text, $tokens) { + protected function viewsTokenReplace($text, $tokens) { if (empty($tokens)) { return $text; } - // Separate Twig tokens from argument tokens. + // Separate Twig tokens from other tokens (e.g.: contextual filter tokens in + // the form of %1). $twig_tokens = array(); $other_tokens = array(); foreach ($tokens as $token => $replacement) {