wp-includes/kses.php:2266Determines if a Unicode codepoint is valid.
$iintboolfunction valid_unicode( $i ) { $i = (int) $i; return ( 0x9 === $i || // U+0009 HORIZONTAL TABULATION (HT) 0xA === $i || // U+000A LINE FEED (LF) 0xD === $i || // U+000D CARRIAGE RETURN (CR) /* * The valid Unicode characters according to the XML specification: * * > any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */ ( 0x20 <= $i && $i <= 0xD7FF ) || ( 0xE000 <= $i && $i <= 0xFFFD ) || ( 0x10000 <= $i && $i <= 0x10FFFF ) );}Introduced in 2.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/kses.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.