[wp-trac] [WordPress Trac] #35951: remove_accents() doesn't escape Unicode NFD characters
WordPress Trac
noreply at wordpress.org
Thu Nov 3 09:44:49 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 add-to-field-guide | Focuses:
------------------------------------------+-----------------------
Comment (by peterfabian1000):
Hi, I just wanted to leave a comment here that it seems some people are
having problems with not having `Normalizer` class available in their
environment, which is problematic for some plugins that call
`remove_accents` more often (like WooCommerce, ref issue
https://github.com/woocommerce/woocommerce/issues/35471).
Besides, there are some core workflows that may end up with a fatal error
as well. E.g. when the admin tries to create a new user with accented
characters, `sanitize_user` calls `remove_accents` and if they don't have
`Normalizer`, it will throw a fatal.
I suppose it should be possible to fail more gracefully, or only use
`Normalizer` if `get_loaded_extensions` includes `intl`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35951#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list