Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Conversation

@joehoyle
Copy link
Member

Right now, updating posts with quotes causes slashes to be saved to the db, as
wp_update_post does wp_slash on already slashed data if you pass it an
object.

I'm not sure if this is the best fix, but the unit test illustrates the issue.

Right now, updating posts with quotes causes slashes to be saved to the
db, as wp_update_post does `wp_slash` on already slashed data if you
pass it an object.

I'm not sure if this is the best fix, but the unit test illustrates the
issue.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have an explicit test for the response title, to make this test more precise?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve of this test. Also worth testing emoji and other unicode characters.

@danielbachhuber danielbachhuber added this to the 2.0 Beta 8 milestone Nov 29, 2015
joehoyle added a commit that referenced this pull request Dec 1, 2015
Post updates should expect slashed data
@joehoyle joehoyle merged commit 6195d9d into develop Dec 1, 2015
@joehoyle joehoyle deleted the fix-slashes-in-update-post branch December 1, 2015 17:51
@danielbachhuber danielbachhuber changed the title Post updates should expect slashed data Ensure post content doesn't get double-slashed on update Dec 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants