Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backslashes not cloned correctly #22

Closed
bobbingwide opened this issue Dec 6, 2017 · 4 comments
Closed

Backslashes not cloned correctly #22

bobbingwide opened this issue Dec 6, 2017 · 4 comments
Assignees
Labels

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Dec 6, 2017

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.

Unpack to a new directory C:\php72

Actual output

Unpack to a new directory C:php72
  • 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

@bobbingwide bobbingwide self-assigned this Dec 6, 2017
@bobbingwide bobbingwide added the bug label Dec 6, 2017
@bobbingwide
Copy link
Owner Author

Looking at another cloned post, it would appear that greater than signs may suffer a similar indignity. This needs to be confirmed.

@bobbingwide
Copy link
Owner Author

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

@bobbingwide
Copy link
Owner Author

Seems I already knew the workaround when I raised this issue exactly one year before rediscovering it yesterday!

@bobbingwide
Copy link
Owner Author

The fix is to call wp_slash before wp_insert_post. Just like it's done in the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant