[wp-trac] [WordPress Trac] #45478: Post slug contains Vietnamese characters

WordPress Trac noreply at wordpress.org
Wed Dec 12 12:53:14 UTC 2018


#45478: Post slug contains Vietnamese characters
------------------------------------------+-----------------------------
 Reporter:  phamquangbaoplus              |       Owner:  SergeyBiryukov
     Type:  enhancement                   |      Status:  accepted
 Priority:  normal                        |   Milestone:  5.0.1
Component:  Permalinks                    |     Version:  5.0
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:5 SergeyBiryukov]:
 > А post titled `Hello, world!` shows `hello,-world!` in the previewed
 permalink, see [attachment:"45478.png"].

 * If I edit the slug to `hello,-world!!!` and click "Save" on the
 permalink input, it stays as entered. At this point, it's not sanitized
 and not saved to database yet.
 * If I click "Save Draft" then, it changes to `hello-world`.
 `sanitize_title()` appears to run now, for some reason only if you
 manually edit slug. `wp_unique_post_slug()` does not run at this point. In
 the database, `post_name` now has this temporary value.
 * If I publish the post, it changes to `hello-world-2`. `sanitize_title()`
 and `wp_unique_post_slug()` finally run without depending on manual slug
 edits, and `post_name` is now correct in the database.

 Would be great to have some consistency here :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45478#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list