Make WordPress Core

Opened 6 weeks ago

Closed 3 weeks ago

#61376 closed defect (bug) (reported-upstream)

Site editor template description displays encoded characters

Reported by: poena's profile poena Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: Cc:


In the Site Editor, it is possible to create a custom page template for pages that have a combination of text and HTML entities in the title.

When such a page template is displayed in the Site Editor, it displays the page title as part of the template description in the Template panel in the Site Editor Sidebar.

The HTML entities are not decoded, for example, a template for a page called
"Hello World & Hello WP" Would show the description: "Template for Hello World & Hello WP"

For some reason, If the page is only called "&" the description displays as "Template for &".

I have only tested this on 6.6-beta1-58337-src. Further testing is needed to determine where the problem was introduced.

The reason why I created a trac ticket instead of a Gutenberg GitHub issue is because the problem seems to be in

Testing Instructions

These steps define how to reproduce the issue, and indicate the expected behavior.

Steps to Reproduce

  1. Activate a block theme.
  2. Create a new page with the title "Hello World & Hello WP"
  3. Go to Appearance > Editor > Templates.
  4. Select "Add new template". Select Pages, and then select the page you just created.
  5. Open the settings sidebar and the template panel.
  6. The description is in the template panel below the page name, close to the top. Check if & displays correctly

Expected Results

  • ❌ the character displays as &

Attachments (1)

template-description.png (41.5 KB) - added by poena 6 weeks ago.
The template description

Download all attachments as: .zip

Change History (3)

6 weeks ago

The template description

#1 @khokansardar
6 weeks ago

@poena it seems gutenberg editor issue. So, I have created the same as you mentioned in this ticket in gutenberg -
Also added the PR for it -

#2 @poena
3 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.