WordPress.org

Making WordPress.org

Opened 6 weeks ago

Closed 5 weeks ago

Last modified 4 weeks ago

#4457 closed defect (fixed)

Encoding issue in the Syntax Highlighter Evolved block

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

Description

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 (10)

#1 @nosolosw
6 weeks 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
6 weeks 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
6 weeks 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
5 weeks 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.

#5 follow-up: @coffee2code
5 weeks ago

@nosolosw: I followed up on the the ticket, but: [8803] did fix the problem, it just never got deployed to production. It has been deployed now and the issue appears resolved. Thanks for checking on it!

#6 in reply to: ↑ 5 @truongwp
5 weeks ago

Replying to coffee2code:

@nosolosw: I followed up on the the ticket, but: [8803] did fix the problem, it just never got deployed to production. It has been deployed now and the issue appears resolved. Thanks for checking on it!

I still see the error on the Theme Handbook page. Has it deployed on this handbook?
https://developer.wordpress.org/themes/functionality/widgets/#registering-a-widget

#7 @coffee2code
5 weeks ago

@truongwp: The problem @nosolosw brought up was somewhat similar but unrelated. That has been fixed. The problem you reported isn't technically fixed yet (this ticket is still open), but I have a fix for it tested locally. I'll push the fix up shortly.

#8 @coffee2code
5 weeks ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 8843:

Developer: Fix double-encoding of > character in code shortcodes.

Props truongwp, coffee2code.
Fixes #4457.

This ticket was mentioned in Slack in #core-docs by coffee2code. View the logs.


5 weeks ago

#10 @coffee2code
4 weeks ago

#4420 was marked as a duplicate.

Note: See TracTickets for help on using tickets.