Conversation
Also update the comment of this method to reflect the current GitHub issues
|
@htdat one thing that's not super clear here or in the bug report is what the expected behaviour should be.
This could mean that currently if you set a slug to I just want to confirm, we expect that post slugs all be lowercase when saved, but currently with Edit Flow that is not the case, correct? |
This is written under the Expected/Desired Behavior in bug report #633 :D
=> This is correct! |
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: