diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index d3903d46c4..156513ae8f 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2288,11 +2288,45 @@ function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'displa '%cc%80', '%cc%84', '%cc%8c', + // Non-visible characters that display without a width. + '%e2%80%8b', + '%e2%80%8c', + '%e2%80%8d', + '%e2%80%8e', + '%e2%80%8f', + '%e2%80%aa', + '%e2%80%ab', + '%e2%80%ac', + '%e2%80%ad', + '%e2%80%ae', + '%ef%bb%bf', ), '', $title ); + // Convert non-visible characters that display with a width to hyphen. + $title = str_replace( + array( + '%e2%80%80', + '%e2%80%81', + '%e2%80%82', + '%e2%80%83', + '%e2%80%84', + '%e2%80%85', + '%e2%80%86', + '%e2%80%87', + '%e2%80%88', + '%e2%80%89', + '%e2%80%8a', + '%e2%80%a8', + '%e2%80%a9', + '%e2%80%af', + ), + '-', + $title + ); + // Convert × to 'x'. $title = str_replace( '%c3%97', 'x', $title ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 1b39ea4130..86fc8c3bef 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51982'; +$wp_version = '5.9-alpha-51984'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.