[wp-trac] [WordPress Trac] #35951: remove_accents() doesn't escape Unicode NFD characters

WordPress Trac noreply at wordpress.org
Thu Jul 21 21:10:14 UTC 2022


#35951: remove_accents() doesn't escape Unicode NFD characters
--------------------------+-----------------------
 Reporter:  onnimonni     |       Owner:  audrasjb
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  6.1
Component:  Charset       |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------
Changes (by audrasjb):

 * owner:  (none) => audrasjb
 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"53754" 53754]:
 {{{
 #!CommitTicketReference repository="" revision="53754"
 Formatting: Normalize to Unicode NFC encoding before converting accent
 characters in `remove_accents()`.

 This changeset adds Unicode sequence normalization from NFD to NFC, via
 the `normalizer_normalize()` PHP function which is available with the
 recommended `intl` PHP extension.

 This fixes an issue where NFD characters were not properly sanitized. It
 also provides a unit test for NFD sequences (alternate Unicode
 representations of the same characters).

 Props NumidWasNotAvailable, targz, nacin, nunomorgadinho, p_enrique,
 gitlost, SergeyBiryukov, markoheijnen, mikeschroder, ocean90, pento,
 helen, rodrigosevero, zodiac1978, ironprogrammer, audrasjb, azaozz,
 laboiteare, nuryko, virgar, dxd5001, onnimonni, johnbillion.
 Fixes #24661, #47763, #35951.
 See #30130, #52654.
 }}}

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


More information about the wp-trac mailing list