Problem when importing Gutenerg block code with special characters
-
Hi,
When I exported post with Gutenberg block code:
<!-- wp:plugin/custom-block {"data":"Exemplary text and \u003ca href=\u0022https://example.com/\u0022\u003eexemplary link\u003c/a\u003e."} /-->
and then imported this post using “One Click Demo Import” plugin then got:
<!-- wp:plugin/custom-block {"data":"Exemplary text and u003ca href=u0022https://example.com/u0022u003eexemplary linku003c/au003e."} /-->
As you can see above after import Gutenberg block code there are missing “\” characters, so block content is not valid then. When importing the same xml file using default WordPress Importer then it works fine (imported content is exactly the same as exported).
Do you have plan to fix it?
Additional notes:
Gutenberg replaces quotes and special characters intentionally, so there is no need to remove “\” during the import. You can read more about it here:https://jeremyfelt.com/2019/04/24/encoding-serialized-attributes-for-gutenberg-blocks-in-php/
- The topic ‘Problem when importing Gutenerg block code with special characters’ is closed to new replies.