Changeset 60405 for trunk/src/wp-includes/kses.php
- Timestamp:
- 07/02/2025 12:33:10 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/kses.php
r59677 r60405 2084 2084 * Determines if a Unicode codepoint is valid. 2085 2085 * 2086 * The definition of a valid Unicode codepoint is taken from the XML definition: 2087 * 2088 * > Characters 2089 * > 2090 * > … 2091 * > Legal characters are tab, carriage return, line feed, and the legal characters of 2092 * > Unicode and ISO/IEC 10646. 2093 * > … 2094 * > Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] 2095 * 2086 2096 * @since 2.7.0 2097 * 2098 * @see https://www.w3.org/TR/xml/#charsets 2087 2099 * 2088 2100 * @param int $i Unicode codepoint. … … 2092 2104 $i = (int) $i; 2093 2105 2094 return ( 0x9 === $i || 0xa === $i || 0xd === $i || 2095 ( 0x20 <= $i && $i <= 0xd7ff ) || 2096 ( 0xe000 <= $i && $i <= 0xfffd ) || 2097 ( 0x10000 <= $i && $i <= 0x10ffff ) 2106 return ( 2107 0x9 === $i || // U+0009 HORIZONTAL TABULATION (HT) 2108 0xA === $i || // U+000A LINE FEED (LF) 2109 0xD === $i || // U+000D CARRIAGE RETURN (CR) 2110 /* 2111 * The valid Unicode characters according to the XML specification: 2112 * 2113 * > any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. 2114 */ 2115 ( 0x20 <= $i && $i <= 0xD7FF ) || 2116 ( 0xE000 <= $i && $i <= 0xFFFD ) || 2117 ( 0x10000 <= $i && $i <= 0x10FFFF ) 2098 2118 ); 2099 2119 }
Note: See TracChangeset
for help on using the changeset viewer.