Diary

SyntaxHighlighter in WordPress Posts Causes HTML Escape Character Display Issues

1 Mins read

WordPress 5.2.1
SyntaxHighlighter plugin 3.5.0

When pasting source code wrapped in SyntaxHighlighter tags, HTML escape characters (greater than/less than signs, etc.) are not displayed correctly.

It appears the WordPress post editor is encoding strings when focus leaves the text box, and this process is causing the problem.

For now, clicking the undo icon in the upper left once reverts to the pre-encoded state, then publishing after that displays correctly.

※The encoding process also runs when the publish button is clicked, so reverting is safe.
Don’t put focus back on the post text box!

 

Update 20190829

Classic Editor

solves the problem!