WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.18k forks source link

the block is broken by incorrect HTML tag in a certain procedure #16276

Open Hironari-Saito opened 5 years ago

Hironari-Saito commented 5 years ago

Hi, I will post for the first time. Thank you for your consideration:)

Describe the bug Paragraph or Heading block is created by pressing plus bottom or Enter key. Sometimes the content must be edited to apply a HTML tag such as adding a span. But, if the tag is mistaken in a certain procedure, the block contents is broken. if the block is made for custom HTML from the beginning, this error do not occur.

To reproduce Steps to reproduce the behavior:

  1. press 「Add block」and select Paragraph
  2. input a sentence
  3. edit as HTML (for the block you input)
  4. input incorrect css as <span class=" " " ">some characters</span>
  5. lose focus (click on other area of the browser)
  6. see error

Expected behavior the invalid HTML Tag is just mistaken because of too much quotation marks, but I think there should be an opportunity to edit the odd one. It may be「This block contains unexpected or invalid content」.

Screenshots before after

Desktop (please complete the following information):

Additional context WordPress 5.2.2

draganescu commented 4 years ago

Howdy @Hironari-Saito and welcome to Gutenberg's GitHub home. This is a very weird issue indeed. I was able to reproduce the problem. It is quite an odd situation.

Just noting that the change this issue requests is to at least be able to edit the invalid HTML.