Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Convert to blocks: put unhandled HTML in HTML block, correct invalid lists #12118
Also restores correcting invalid list HTML.
How has this been tested?
Types of changes
Nov 20, 2018
1 check passed
I did an extensive set of tests and everything looked in my tests, and the code looks correct
I tried to understand the relation of this changes with the changes in #11244 and I think #11244 is still needed.
What happens now if we call
wp.blocks.unregisterBlockType('core/preformatted'); and we paste
<pre>aaaaa</pre> is that we get an HTML block with a pre tag but empty content because when the content arrives at the function that creates the HTML block it was already filtered in accordance with the schema of the code block and the invalid text child was removed.