[wp-trac] [WordPress Trac] #3329: Need to strip % from the auto-permalink in the editor.

WordPress Trac noreply at wordpress.org
Thu Feb 2 12:43:17 UTC 2023


#3329: Need to strip % from the auto-permalink in the editor.
-------------------------------------------------+-------------------------
 Reporter:  Heyneken                             |       Owner:  pishmishy
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Permalinks                           |     Version:  2.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-refresh needs-unit-  |     Focuses:
  tests 2nd-opinion                              |
-------------------------------------------------+-------------------------
Changes (by Mte90):

 * keywords:  has-patch needs-refresh needs-unit-tests => has-patch needs-
     refresh needs-unit-tests 2nd-opinion


Comment:

 Just to recap all the discussion in those years in this ticket with also
 https://core.trac.wordpress.org/ticket/25021

 * The patch attached use
 https://www.php.net/manual/en/function.urlencode.php to generate the
 permalink and also in WP_Query for the `name` search
 * Remove some sanitization like #25021 patch in
 `sanitize_title_with_dashes`
 * The other ticket mention to test if breaks something with
 `sanitize_title_for_query`

 So we have 2 issues, one is to sanitize the post title and another one do
 the same for the permalink.
 To proceed, we need to test also the search in the database with this
 sanitization and probably for backwards compatibility too.

 I tested on latest 6.2 alpha and everything is working, the URL is
 generated http://trunk.wordpress.test/x-1898-y-%10/ in Firefox and Chrome
 works. Probably because now there is a better support for punycode and
 unicode also in the URLs?

 So I am not sure if this is still an issue after all those years.
 Maybe adding just a test to verify if URL with `%10` works can simplify
 everything?

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


More information about the wp-trac mailing list