Make WordPress Core

Timestamp:
10/21/2025 02:33:54 AM (12 months ago)
Author:
dmsnell
Message:

Charset: wp_has_noncharacters() for more-specific Unicode handling.

Noncharacters are code points that are permanently reserved in the Unicode Standard for internal use. They are not recommended for use in open interchange of Unicode text data. However, they are valid code points and will not cause a string to return as invalid.

Still, HTML and XML both impose semantic rules on their use and it may be important for code to know whether they are present in a string. This patch introduces a new function, wp_has_noncharacters(), which answers this question.

See ​https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-23/#G12612

Developed in ​https://github.com/WordPress/wordpress-develop/pull/9827
Discussed in https://core.trac.wordpress.org/ticket/63863

See #63863.

File:
1 added

Note: See TracChangeset for help on using the changeset viewer.