[wp-trac] [WordPress Trac] #47912: Non-visible chars in title creates some encoded values in permalink

WordPress Trac noreply at wordpress.org
Wed Aug 11 18:45:02 UTC 2021


#47912: Non-visible chars in title creates some encoded values in permalink
-------------------------------------+-------------------------------------
 Reporter:  dhanendran               |       Owner:  SergeyBiryukov
     Type:  defect (bug)             |      Status:  accepted
 Priority:  normal                   |   Milestone:  5.9
Component:  Permalinks               |     Version:  5.2.2
 Severity:  major                    |  Resolution:
 Keywords:  has-patch has-unit-      |     Focuses:  ui, rtl,
  tests                              |  administration
-------------------------------------+-------------------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch needs-testing has-unit-tests => has-patch has-unit-
     tests


Comment:

 == Testing Report

 === Env

 - WordPress: 5.8 and trunk
 - PHP: 7.4.1 and 8.0
 - Localhost: `wp-env` and Local
 - OS: macOS Big Sur 11.5
 - Browser: Chrome 92.0.4515.131 and Firefox 90.0.2
 - Theme: Twenty Twenty-One
 - Plugins: none activated
 - Custom scripts: none

 === Steps to Test

 - Add New Post
 - Copy and paste `Non visible char` as the title
 - Publish post
 - Notice the pretty permalink generated, e.g.
 `http://wpdevtest.local/non%e2%80%80visible-char/`
 - Apply the patch
 - Repeat the above steps with title `Non visible char with patch`
 - Notice the pretty permalink generated which should strip out the
 nonvisible characters, e.g. `http://wpdevtest.local/non-visible-char-with-
 patch/`

 === Test Results

 [attachment:"47912-test-pr1329.gif" captured in the attached gif]

 - Reproduced the problem ✅
   - The generated permalink includes the non-visible characters
   - Result: `http://wpdevtest.local/non%e2%80%80visible-char/`
 - After applying patch, problem fixed ✅
   - Non-visible characters removed from the permalink
   - Result: `http://wpdevtest.local/non-visible-char-with-patch/`

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


More information about the wp-trac mailing list