[wp-trac] [WordPress Trac] #63863: Standardize UTF-8 handling and fallbacks in 6.9
WordPress Trac
noreply at wordpress.org
Tue Oct 21 03:48:38 UTC 2025
#63863: Standardize UTF-8 handling and fallbacks in 6.9
--------------------------------------+-----------------------
Reporter: dmsnell | Owner: dmsnell
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.9
Component: Charset | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------
Comment (by dmsnell):
In [changeset:"61003" 61003]:
{{{
#!CommitTicketReference repository="" revision="61003"
HTML API: Replace PCRE in `set_attribute()` with new UTF-8 utility.
The HTML API has relied upon a single PCRE to determine whether to allow
setting certain attribute names. This was because those names aren’t
allowed to contain Unicode noncharacters, but detecting noncharacters
without a UTF-8 parser is nontrivial.
In this change the direct PCRE has been replaced with a number of
`strcpn()` calls and a call to the newer `wp_has_noncharacters()`
function. Under the hood, this function will still defer to a PCRE if
Unicode support is available, but otherwise will fall back to the UTF-8
pipeline in Core.
This change removes the platform variability, making the HTML API more
reliable when Unicode support for PCRE is lacking.
Developed in https://github.com/WordPress/wordpress-develop/pull/9798
Discussed in https://core.trac.wordpress.org/ticket/63863
See #63863.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63863#comment:46>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list