tags being stripped in classic block content after WP upgrade
-
Today I upgraded from WP 4.8 to WP 5.0.3. Also updated HTML Editor Syntax Highlighter plugin to latest 2.3.1 version (I am not using the classic editor plugin). My prior page content had all been created via prior version (as far back as version 1.7) of this HTML editor plugin under WP 4.6 & 4.8. In the WP upgrade, the page content was automatically converted over to Gutenberg by placing all the content into a single Classic block (as expected, I guess). When setting Gutenberg to “code editor” this plugin kicks in and generally seems to work, but with some glaring problems, as follows:
When attempting to edit the carried over content in the classic block, some tag types, like the p tag, do not show in the editor, and if I enter them they disappear when saving (both opening and closing tags get stripped from display whether there is content in the p tag or not).. However the p tags do show up when I switch over to the standard Gutenberg visual editor and display via the HTML view (and I confirmed via browser inspector that the tags are in fact there in the published code). The p tags do also show (don’t get stripped from display) if they contain any properties. Also noticed that line break tags were getting stripped or not showing and converted into an empty pair of p tags…. br tags do show on the standard Gutenberg HTML editor. So, all the carried over html would display OK in the Gutenberg visual html view, but not when switching to the plugin/”code editor” mode.
I did some experimenting and found that if the original classic block containing the legacy content is on the page by itself, the above problems exist, however if I use the Gutenberg visual editor to add a different block type, like an empty html block at teh bottom of the page, then the existing p tags in the original classic block content suddenly show up OK and can p tags can also then be added and saved without being stripped. Somehow, by using the new block types in addition to the classic, the tags in the original classic block display correctly, or at least more correctly…
I’ve seen some other articles about other editor plugins having similar problems, but have not seen anyone commenting on such an issue for this particular plugin.
Is this a known issue with any solutions known?
UPDATE: I installed the “Classic Editor” Plugin and the same problems occur in the classic text editing mode using same updated config described above: existing p tags and br tags are not visible, and disappear when saving page after adding them, even though they actually exist in the code. Prior to the WP and html editor updates mentioned above, everything was fine, no tags were ever stripped from the display.
Thanks!
- The topic ‘tags being stripped in classic block content after WP upgrade’ is closed to new replies.