[wp-trac] [WordPress Trac] #44958:   character in title generates a permalink (and slug) with space
WordPress Trac
noreply at wordpress.org
Sun Jul 9 14:52:22 UTC 2023
#44958:   character in title generates a permalink (and slug) with space
-------------------------------------------------+-------------------------
Reporter: ace2_heart | Owner: (none)
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Awaiting
| Review
Component: Permalinks | Version: 4.8
Severity: major | Resolution:
Keywords: needs-testing reporter-feedback | Focuses:
has-patch |
-------------------------------------------------+-------------------------
Changes (by Presskopp):
* keywords: needs-testing reporter-feedback => needs-testing reporter-
feedback has-patch
Comment:
Here's a patch to get around any `%e2%80` constructions like:
{{{
%e2%80
%e2%80test
%e2%80%
%e2%80%93
%e2%80%94
%e2%80%943
%e2%80%3
%e2%80%94slug
my%e2%80%94slug
my%e28094slug
my%e2%80%A8slug
...
}}}
While I think the regex itself is quite robust, this needs testing to fit
well into the `sanitize_title_with_dashes` function, but I hope it helps
on the way
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44958#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list