Skip to content

Ampersand's in the Navigation block are converted to u0026 #59516

@kylekelly

Description

@kylekelly

Description

Adding ampersands '&' to the label field of a link (page & custom) in the Navigation block converts it to u0026, which displays on the frontend and backend once refreshed.

Step-by-step reproduction instructions

  1. Go to the latest 6.5-beta3 (or nightly) on your test site, or in playground: https://playground.wordpress.net/?php=8.0&wp=beta&storage=none
  2. Edit site, and add a link to the navigation block.
  3. Include an ampersand in the label of a link in the block, an example being 'News & Events'
  4. View the frontend of the site and see it converted to 'u0026'

Screenshots, screen recording, code snippet

Screenshot 2024-03-01 at 4 39 24 PM Screenshot 2024-03-01 at 4 38 17 PM

Environment info

  • WordPress 6.5 beta3 & Nightly
  • Tested and seen with both Gutenberg not installed, and installed and activated.
  • Tested in both latest Chrome & Firefox

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Labels

[Block] NavigationAffects the Navigation Block[Type] BugAn existing feature does not function as intended

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions