Closed bobbingwide closed 5 years ago
Looking at another cloned post, it would appear that greater than signs may suffer a similar indignity. This needs to be confirmed.
This issue affects the cloning of content created using Gutenberg. The CSV block contains new line characters ( \n ) which are converted to just the n's. See most recent oik_pluginversions in s.b/oikcom
Seems I already knew the workaround when I raised this issue exactly one year before rediscovering it yesterday!
The fix is to call wp_slash before wp_insert_post. Just like it's done in the update!
Content containing backslashes has lost them in the cloned post.
Expected output
Post content such as backslashes to be the same on the target as on the server.
Actual output
On first clone the backslashes disappear.
On subsequent cloning they reappear.
I should have taken a screen capture. See https://herbmiller.me/2017/12/06/migrating-php-7-2/
It appears that the problem only happens on post creation. In subsequent cloning, where I'd converted one of them to \ I can see all the backslashes. We can see all the changes in the Revisions.
Workaround
Clone the content multiple times.
Problem explanation
TBD
Proposed solution
TBD