Automattic / Automattic/jetpack
Markdown: unwanted entity encoding occurs inside backticks
Open
[Feature] Markdown
[Pri] Normal
[Status] Stale
Bug
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
Entities (like ampersands) inside code fencing backticks get turned into HTML entities if the Visual mode of the editor is used to edit or compose a post (the Text mode leaves them alone), e.g.:
`if ( false === $bar && $foo ) return $foobar;`
becomes
`if ( false === $bar && $foo ) return $foobar;`
Just toggling into the visual mode and then back to text mode entity-izes the content. (This also happens inside code tags as well, unfortunately.)
Not sure if the fix lies with Markdown or with the Visual mode of the editor (or both).
Contributor guide
Assessment
This issue has not been assessed yet.