craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.27k stars 634 forks source link

[4.x]: Markdown in UI elements: Quotes inside inline code are incorrectly escaped #13959

Closed MoritzLost closed 10 months ago

MoritzLost commented 11 months ago

What happened?

Description

Not sure if this is an issue in the Markdown engine or in Craft. I'm talking about UI Elements like the Tip in Field Layouts. Single or double quotes inside inline code (marked up with backticks) are converted to entities, but the entities are visible in plaintext to the end user.

Steps to reproduce

  1. Add a Tip to any Field Layout with the following content:
`"Double Quotes"` or `'Single Quotes'`

Then open the entry form, the text displays like this:

"Test" 'Test'

Screenshot showing the incorrectly escaped tip contents

Expected behavior

The quotes should be displayed as quotes instead of entities, as shown in the first example above.

Actual behavior

The quotes are output as HTML entity shortcodes to the page.

Craft CMS version

4.5.11

PHP version

8.2

i-just commented 11 months ago

Hi, thanks for reporting! I raised a PR to adjust this.

brandonkelly commented 10 months ago

Craft 4.5.13 is out with a fix for this. Thanks again!