Changeset 59765
- Timestamp:
- 02/05/2025 11:51:28 PM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r59515 r59765 575 575 $text = preg_replace_callback( '/<(script|style|svg|math).*?<\/\\1>/s', '_autop_newline_preservation_helper', $text ); 576 576 577 // Normalize <br> 577 // Normalize <br>. 578 578 $text = str_replace( array( '<br>', '<br/>' ), '<br />', $text ); 579 579 … … 622 622 * @since 4.4.0 623 623 * 624 * @return string The regular expression 624 * @return string The regular expression. 625 625 */ 626 626 function get_html_split_regex() { … … 682 682 * 683 683 * @param string $shortcode_regex Optional. The result from _get_wptexturize_shortcode_regex(). 684 * @return string The regular expression 684 * @return string The regular expression. 685 685 */ 686 686 function _get_wptexturize_split_regex( $shortcode_regex = '' ) { … … 724 724 * 725 725 * @param string[] $tagnames Array of shortcodes to find. 726 * @return string The regular expression 726 * @return string The regular expression. 727 727 */ 728 728 function _get_wptexturize_shortcode_regex( $tagnames ) { … … 878 878 * @since 1.2.1 879 879 * 880 * @param string $str The string to be checked 880 * @param string $str The string to be checked. 881 881 * @return bool True if $str fits a UTF-8 model, false otherwise. 882 882 */ … … 905 905 } 906 906 907 for ( $j = 0; $j < $n; $j++ ) { // n bytes matching 10bbbbbb follow 907 for ( $j = 0; $j < $n; $j++ ) { // n bytes matching 10bbbbbb follow? 908 908 if ( ( ++$i === $length ) || ( ( ord( $str[ $i ] ) & 0xC0 ) !== 0x80 ) ) { 909 909 return false; … … 1140 1140 * 1141 1141 * @param string $utf8_string String to encode. 1142 * @param int $length Max length of the string 1142 * @param int $length Max length of the string. 1143 1143 * @param bool $encode_ascii_characters Whether to encode ascii characters such as < " ' 1144 1144 * @return string String with Unicode encoded for URI. … … 2537 2537 * @since 0.71 2538 2538 * 2539 * @param string $text Text to be balanced 2539 * @param string $text Text to be balanced. 2540 2540 * @param bool $force If true, forces balancing, ignoring the value of the option. Default false. 2541 * @return string Balanced text 2541 * @return string Balanced text. 2542 2542 */ 2543 2543 function balanceTags( $text, $force = false ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
Note: See TracChangeset
for help on using the changeset viewer.