diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index 3ecc352528..8e89401d34 100644
|
a
|
b
|
function wp_html_split( $input ) { |
| 621 | 621 | * |
| 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() { |
| 627 | 627 | static $regex; |
| … |
… |
function get_html_split_regex() { |
| 681 | 681 | * @since 4.4.0 |
| 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 = '' ) { |
| 687 | 687 | static $html_regex; |
| … |
… |
function _get_wptexturize_split_regex( $shortcode_regex = '' ) { |
| 723 | 723 | * @since 4.4.0 |
| 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 ) { |
| 729 | 729 | $tagregexp = implode( '|', array_map( 'preg_quote', $tagnames ) ); |
| … |
… |
function shortcode_unautop( $text ) { |
| 877 | 877 | * @author bmorel at ssi dot fr (modified) |
| 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 | */ |
| 883 | 883 | function seems_utf8( $str ) { |
| … |
… |
function wp_check_invalid_utf8( $text, $strip = false ) { |
| 1139 | 1139 | * @since 5.8.3 Added the `encode_ascii_characters` parameter. |
| 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. |
| 1145 | 1145 | */ |
| … |
… |
function convert_invalid_entities( $content ) { |
| 2536 | 2536 | * |
| 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 |
| 2544 | 2544 | if ( $force || (int) get_option( 'use_balanceTags' ) === 1 ) { |
| … |
… |
function esc_html( $text ) { |
| 4688 | 4688 | function esc_attr( $text ) { |
| 4689 | 4689 | $safe_text = wp_check_invalid_utf8( $text ); |
| 4690 | 4690 | $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES ); |
| | 4691 | $safe_text = preg_replace( '/\s*on\w+\s*=\s*["\']?.*?["\']?/i', '', $safe_text ); |
| 4691 | 4692 | /** |
| 4692 | 4693 | * Filters a string cleaned and escaped for output in an HTML attribute. |
| 4693 | 4694 | * |
| … |
… |
function esc_attr( $text ) { |
| 4696 | 4697 | * |
| 4697 | 4698 | * @since 2.0.6 |
| 4698 | 4699 | * |
| 4699 | | * @param string $safe_text The text after it has been escaped. |
| | 4700 | * @param string $safe_text The text after it has been sanitized and escaped. |
| 4700 | 4701 | * @param string $text The text prior to being escaped. |
| 4701 | 4702 | */ |
| 4702 | 4703 | return apply_filters( 'attribute_escape', $safe_text, $text ); |