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

WordPress Trac noreply at wordpress.org
Tue Nov 2 18:46:50 UTC 2021


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

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"51984" 51984]:
 {{{
 #!CommitTicketReference repository="" revision="51984"
 Permalinks: Sanitize non-visible characters inside
 `sanitize_title_with_dashes()`.

 This change prevents non-visible characters in titles from creating
 encoded values in permalinks, opting instead for the following replacement
 strategy:

 * Non-visible non-zero-width characters are replaced with hyphens
 * Non-visible zero-width characters are removed entirely

 Included with this change are 64 additional PHPUnit assertions to confirm
 that only the targeted non-visible characters are sanitized as intended.

 Before this change, URLs would unintentionally contain encoded values
 where these non-visible characters were. After this change, URLs
 intentionally strip out or hyphenate these non-visible characters.

 Props costdev, dhanendran, hellofromtonya, paaljoachim, peterwilsoncc,
 poena, sergeybiryukov.

 Fixes #47912.
 }}}

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


More information about the wp-trac mailing list