From d06036fea38a344a154dfca7fc4902dc14865122 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 25 Oct 2025 18:24:32 +0000 Subject: [PATCH] Formatting: Replace non-breaking hyphens (U+2011) with hyphens in `sanitize_title_with_dashes()`. Developed in https://github.com/WordPress/wordpress-develop/pull/10204 Follow-up to [18705], [36775]. Props patpiwo, westonruter, dmsnell. See #31790, #10797. Fixes #64089. Built from https://develop.svn.wordpress.org/trunk@61061 git-svn-id: http://core.svn.wordpress.org/trunk@60397 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 4f28e74575..dd7d7861d1 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2294,10 +2294,10 @@ function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'displa $title = strtolower( $title ); if ( 'save' === $context ) { - // Convert  , &ndash, and &mdash to hyphens. - $title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title ); - // Convert  , &ndash, and &mdash HTML entities to hyphens. - $title = str_replace( array( ' ', ' ', '–', '–', '—', '—' ), '-', $title ); + // Convert  , non-breaking hyphen, &ndash, and &mdash to hyphens. + $title = str_replace( array( '%c2%a0', '%e2%80%91', '%e2%80%93', '%e2%80%94' ), '-', $title ); + // Convert  , non-breaking hyphen, &ndash, and &mdash HTML entities to hyphens. + $title = str_replace( array( ' ', '‑', ' ', '–', '–', '—', '—' ), '-', $title ); // Convert forward slash to hyphen. $title = str_replace( '/', '-', $title ); diff --git a/wp-includes/version.php b/wp-includes/version.php index b15025734a..b780de778b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-beta1-61060'; +$wp_version = '6.9-beta1-61061'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.