diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/formatting.php --- a/wp/wp-includes/formatting.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-includes/formatting.php Fri Sep 05 18:40:08 2025 +0200 @@ -136,8 +136,10 @@ $static_characters = array_merge( array( '...', '``', '\'\'', ' (tm)' ), $cockney ); $static_replacements = array_merge( array( '…', $opening_quote, $closing_quote, ' ™' ), $cockneyreplace ); - // Pattern-based replacements of characters. - // Sort the remaining patterns into several arrays for performance tuning. + /* + * Pattern-based replacements of characters. + * Sort the remaining patterns into several arrays for performance tuning. + */ $dynamic_characters = array( 'apos' => array(), 'quote' => array(), @@ -242,7 +244,7 @@ // Only call _wptexturize_pushpop_element if $curl is a delimiter. $first = $curl[0]; if ( '<' === $first ) { - if ( ' ' ) ); // Collapse line breaks before and after ', $text ); } @@ -507,7 +511,7 @@ * Collapse line breaks inside elements, before and elements * so they don't get autop'd. */ - if ( strpos( $text, '' ) !== false ) { + if ( str_contains( $text, '' ) ) { $text = preg_replace( '|(]*>)\s*|', '$1', $text ); $text = preg_replace( '|\s*|', '', $text ); $text = preg_replace( '%\s*(]*>)\s*%', '$1', $text ); @@ -517,14 +521,14 @@ * Collapse line breaks inside