Open dreamwhisper opened 5 years ago
I tested with WordPress 4.9.8 and Gutenberg 4.5.1 using Firefox 63.0.3 on macOS 10.13.6 and found that when I add the sample HTML provided into a classic block in "Edit as HTML" mode that it prompts me to either restore or convert to HTML.
Seen at https://tan-otter.jurassic.ninja/wp-admin/post.php?post=111&action=edit running WordPress 4.9.8 and Gutenberg 4.5.1 using Firefox 63.0.3 on macOS 10.13.6.
Leaving the Needs Testing
label for now and noting we should also get a tester to check from Windows.
Aha, I just realized I missed a step in the instructions which was to disable Gutenberg before adding the sample HTML. So I re-tested and confirmed that creating a post with invalid HTML content using the Text editor in WordPress 4.9.8 without Gutenberg and then activating Gutenberg and opening the post results in the content from the invalid HTML forward to be removed.
Seen at https://tan-otter.jurassic.ninja/wp-admin/post.php?post=112&action=edit running WordPress 4.9.8 and Gutenberg 4.5.1 using Firefox 63.0.3 on macOS 10.13.6.
Note: it's possible this is the intended behavior.
Note: it's possible this is the intended behavior.
We see varying degrees of HTML errors in content when reviewing customer theme support requests, including this example. For non-technical users editing previously written content, missing content is unexpected and I wouldn't expect them to know how to resolve it.
I don't know if the content removal extends beyond a missing quote, but there's no indication that any content has been removed, and if the content is long, they may not realize it is missing initially.
Another way to trigger this, particularly now that Gutenberg is available in the stable WordPress 5.0 release, is by pasting the text from the original content in the "Code Editor" of the new post editor screen.
After leaving the field, all but the first paragraph of text is removed.
it's not entirely clear to me at the moment what precisely an expected behavior would be, since Gutenberg is unable to process the content as valid HTML.
Browsers behave in much the same way as what's seen in Gutenberg: https://codepen.io/aduth/pen/gqXVxo
I must then think that something about the previous editor (likely in TinyMCE itself?) had applied a very specific correction to the content.
Describe the bug If there is invalid markup such as a missing
"
in the Classic editor, when activating the Gutenberg plugin or updating to RC1, the result is that content after that error is removed from the post.To Reproduce Steps to reproduce the behavior:
Expected behavior All content will be visible so you can correct the error. As of now, it seems to simply delete everything after the invalid portion.
Desktop
Additional context Gutenberg 4.5.1 or WordPress 5.0 RC1