Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML Block escapes & after a < inside the block #19371

Closed
FireEmerald opened this issue Dec 31, 2019 · 1 comment
Closed

HTML Block escapes & after a < inside the block #19371

FireEmerald opened this issue Dec 31, 2019 · 1 comment
Labels
[Block] HTML Affects the the HTML Block [Type] Bug An existing feature does not function as intended

Comments

@FireEmerald
Copy link

FireEmerald commented Dec 31, 2019

Describe the bug
The gutenberg editor sometimes escapes the char & > &#038; inside a html block.
This entirely breaks the usage of the wp:html block.

To reproduce
I don't know exactly how to reproduce. But it seems like the < comparator breaks it.
Could have to do something with your detection of the <!-- wp:html --> ?

Expected behavior
The & should not be escaped as shown in row 174.

Screenshots
Backend editor:
2019-12-31 15_27_05-Window

Produced frontend code:
2019-12-31 15_27_41-Window

Every & below line 174 is escaped - it's irrelevant where i place it:
2019-12-31 15_51_50-Window

If i place a > directly after <, the & is not escaped anymore:
2019-12-31 15_56_42-Window

Just for fun i placed inside a comment a > and it's working (as workaround):
2019-12-31 16_07_17-Window

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 79.0.3945.88

Additional context

@FireEmerald FireEmerald changed the title HTML Block does escape & sometimes HTML Block escapes & after a < inside the block Dec 31, 2019
@jorgefilipecosta jorgefilipecosta added the [Type] Bug An existing feature does not function as intended label Feb 7, 2020
@skorasaurus skorasaurus added the [Block] HTML Affects the the HTML Block label Nov 23, 2020
@skorasaurus
Copy link
Member

Hi,

Thanks for reporting; there's another issue that covers this - #26362 and has more discussion about this so I'm closing this to direct discussion to there.

Thank you very much for the images and detailed description; that is really helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] HTML Affects the the HTML Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants