Automattic / Automattic/syntaxhighlighter
Escaping issue in shortcodes
- Dominant language
- CSS
- Stars
- 251
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to Reproduce
- Have a Gutenberg paragraph block with shortcode:
`[code lang="php"]if(a && b) {}[/code]`
*— special characters are escaped for this in the stored post content*
- Syntaxhighlighter also escapes this and renders `if(a && b) {}`
### PHP / WordPress / SyntaxHighlighter Evolved version
- Issue is present in 3.6.0 even after the fixes, which looks like only fixed it for code blocks
### Context / Source
See p7H4VZ-3dm-p2
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the `[code lang="php"]` shortcode in a Gutenberg paragraph using `if(a && b) {}` and compare the stored post content with the rendered output. Trace the shortcode's escaping path first; done means the rendered code shows `&&` once rather than double-escaped `&`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100