Making WordPress.org

Opened 5 days ago

Last modified 7 minutes ago

#4457 new defect

Encoding issue in the Syntax Highlighter Evolved block

Reported by: truongwp Owned by:
Milestone: Priority: normal
Component: Developer Hub Keywords:


See this page: https://developer.wordpress.org/themes/functionality/widgets/#registering-a-widget

Many > characters display as >.

When I view the page source, I see that the > character is encoded 2 times to >

I copied the content from the live site to my local site. This issue does not occur on my local.

I'm trying installing meta-environment to check if there is another plugin/code causes this.

Change History (4)

#1 @nosolosw
4 days ago

  • Type changed from enhancement to defect

There is a maybe related issue in the Block Editor Handbook. See the second example at https://developer.wordpress.org/block-editor/tutorials/javascript/extending-the-block-editor/.

cc @coffee2code

#2 @coffee2code
3 days ago

@nosolosw: I believe the example you cited is a different Syntax Highlighter bug(?) that's causing the code block in question (the 2nd on the page) to subsume all text up to and through the next code block.

It's triggered by the fix we're doing for the double-encoded HTML entities that were appearing in code blocks. I have a fix that I'm about to land.

#3 @coffee2code
3 days ago

In 8803:

Developer: Use SyntaxHighligher-specific hook for more targeted fix for double-encoded HTML entities in code shortcodes.

Fixes a bug that cropped up using the previous approach that in specific situations somehow caused SyntaxHighlighter to have a code block subsume all text up to and through the next code block.

See #4457.

#4 @nosolosw
7 minutes ago

@coffee2code my understanding is that rev8803 was supposed to fix the issue with the subsumed text? I still see the bug, though. I went ahead and created https://meta.trac.wordpress.org/ticket/4462 to track that separately and don't hijack this ticket.

Note: See TracTickets for help on using tickets.