Problem/Motivation

CurrentPageTitle is relying on urlencode to do HTML escaping. But urlencode does other things we don't want here, like turning non-ASCII characters into percent-encoded values.

Proposed resolution

According to Drupal\Core\Controller\TitleResolverInterface, where we're getting the title from, title can be either:

  • a render array like ['#markup' => 'title', '#allowed_tags' => ['em']]
  • a string

So if $value is an array, we should call render($value). If it's a string, we can let twig auto-escape it (as now).

CommentFileSizeAuthor
#2 3217911-2.patch569 byteserik.erskine

Comments

erik.erskine created an issue. See original summary.

erik.erskine’s picture

StatusFileSize
new569 bytes

Here's a patch.

erik.erskine’s picture

Status: Active » Needs review

markconroy’s picture

markconroy’s picture

Status: Needs review » Fixed
markconroy’s picture

Assigned: erik.erskine » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.