Automattic / Automattic/syntaxhighlighter

& get's escaped multiple times in TinyMCE 4

Open
#65 4 comments 0 reactions 0 assignees View on GitHub
[Status] Accepted [Type] Bug
Dominant language
CSS
Stars
251
Forks
81
PR merge metrics
No merged PRs in 30d

Description

When using TinyMCE 4 a problem can occur with the escaping of `&` characters.

There is a blind search and replace of `&` to `&`.
In the TinyMCE javascript there is unescaping and escaping for `pre_wpautop` and `wpautop` which should avoid this problem.

The solution which worked best for me is to add an additional replace to make sure there are no `&` occurences in the shortcode content.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named. Start by tracing the blind ampersand-to-ampersand-entity replacement and the TinyMCE pre_wpautop and wpautop escaping paths; verify that shortcode content no longer produces amp;amp; occurrences.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wordpress
Domain
content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.