[wp-trac] [WordPress Trac] #43224: Extract `$utf8_pcre` from `wp_check_invalid_utf8()` into a separate function
WordPress Trac
noreply at wordpress.org
Tue Sep 23 21:35:19 UTC 2025
#43224: Extract `$utf8_pcre` from `wp_check_invalid_utf8()` into a separate
function
-------------------------+------------------------------
Reporter: jaswrks | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: normal | Resolution: fixed
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by dmsnell):
Thanks for asking for the double-check @desrosj — it never hurts.
Perhaps there is another resolution more appropriate here, but I took this
statement from the ticket as the dominant ask:
> other areas of the codebase might want to run the same check, or maybe
plugins would like to check also
That is, this is less about //removing// the ad-hoc check from
`wp_check_invalid_utf8()` and more about //abstracting// the check and
making it available. It may have simply been the case that it was already
available when this ticket was created and that wasn’t clear.
Either way, the function has been available //and// it’s no longer
relevant in `wp_check_invalid_utf8()` since it was refactored in [60793].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43224#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list