backdrop-issues icon indicating copy to clipboard operation
backdrop-issues copied to clipboard

Text format names are double-escaped in the Editor selector

Open bugfolder opened this issue 2 years ago • 1 comments

Description of the bug

Text format names are double-escaped in the Editor selector for formatted text fields.

Steps To Reproduce

To reproduce the behavior:

Create a text format that contains an HTML tag as part of the name, e.g., like these:

Screen Shot 2023-09-18 at 11 20 04 AM

Then create a new node, expand the "Formatting options" under the body, and click the Editor drop-down.

Actual behavior

The format name is doubly escaped, like this:

Screen Shot 2023-09-18 at 11 20 22 AM

Expected behavior

The names should show up the way they do on the text format listing page.

Additional information

Add any other information that could help, such as:

  • Backdrop CMS version: 1.27.0-dev

Related closed issues:

  • https://github.com/backdrop/backdrop-issues/issues/6065
  • https://github.com/backdrop/backdrop-issues/issues/6126

bugfolder avatar Sep 18 '23 18:09 bugfolder

I made a PR for this that sanitizes in JS rather than PHP.

NormPlum avatar Oct 30 '25 10:10 NormPlum