diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index 66a2e5f..d683ea7 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -1327,7 +1327,11 @@ protected function renderAsLink($alter, $text, $tokens) { // strip_tags() removes , so check whether its different to front. if ($path != 'route:') { // Unescape Twig delimiters that may have been escaped by the - // Url::toUriString() call above. + // Url::toUriString() call above, because we support twig tokens in + // rewrite settings of views fields. + // In that case the original path looks like + // user-path:/admin/content/files/usage/{{fid}}, which will be escaped by + // the toUriString() call above. $path = str_replace(['%7B','%7D'], ['{','}'], $path); // Use strip tags as there should never be HTML in the path.