Script and style conversions from classic to Gutenberg #8228
Open
Description
When you write a post, many users that just run their very own site have unfiltered HTML access. This allows them to put styles and scripts into the post content, and many do this, following guides and tutorials on the net, or just needing a quick fix on a single particular page.
When you open a page with script
or style
tags in the post content, they are displayed in the visual mode first, this in it self adds unwanted br
tags to the styles section which modifies existing content in the classic editor even without converting to blocks.
If you do convert to blocks, both styles and scripts are converted to regular paragraphs, with linebreaks showing as plain text <br>
inside those paragraphs.
There are two expected outcomes here:
- Existing content shouldn't be modified by the pretty preview of the classic editor block if it was used in text mode previously, we can get this from the user data like the classic editor does
- I expect
style
andscript
tags to be converted into the Custom HTML block, to retain their functionality even after converting