Fix: updating post slugs in Quick Edit and Classic Editor #648
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #633
Description
This is to address the issue as mentioned in issue #633. It was introduced from this PR #575 that fixes a relevant issue with post slug in Gutenberg #523.
The issue is happening around these lines:
http://github.com/Automattic/Edit-Flow/blob/124c3cde900c22abe15c04b0b2bd11e306b2aef4/modules/custom-status/custom-status.php#L1390-L1394
In this PR, I am just running sanitize_title to fix this issue.
It's not an issue with Gutenberg as Gutenberg itself tries to convert the slug in the front-end before sending it to the back-end:
Steps to Test
Case 1 - Quick Edit
Quick Edit
.MY-post-slug
.my-post-slug
.Case 2 - Classic Editor
MY-post-slug
, and save this post.my-post-slug
.my-post-slug
.Case 3 - Gutenberg editor
MY-post-slug
.my-post-slug
.my-post-slug
.Screenshot
Gutenberg sanitizes post slugs in the front-end: