diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index 2f22ec25f8..ba6066c47c 100644
--- a/src/wp-includes/formatting.php
+++ b/src/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/tests/phpunit/tests/formatting/sanitizeTitleWithDashes.php b/tests/phpunit/tests/formatting/sanitizeTitleWithDashes.php
index 5c7a81cb29..8a2ee4f9d9 100644
--- a/tests/phpunit/tests/formatting/sanitizeTitleWithDashes.php
+++ b/tests/phpunit/tests/formatting/sanitizeTitleWithDashes.php
@@ -85,6 +85,20 @@ class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase {
$this->assertSame( 'do-the-dash', sanitize_title_with_dashes( 'Do — the — Dash', '', 'save' ) );
}
+ /**
+ * @ticket 64089
+ */
+ public function test_replaces_non_breaking_hyphen() {
+ $this->assertSame( 'do-the-dash', sanitize_title_with_dashes( 'Do‑the Dash', '', 'save' ) );
+ }
+
+ /**
+ * @ticket 64089
+ */
+ public function test_replaces_non_breaking_hyphen_entity() {
+ $this->assertSame( 'do-the-dash', sanitize_title_with_dashes( 'Do ‑ the Dash', '', 'save' ) );
+ }
+
public function test_replaces_iexcel_iquest() {
$this->assertSame( 'just-a-slug', sanitize_title_with_dashes( 'Just ¡a Slug', '', 'save' ) );
$this->assertSame( 'just-a-slug', sanitize_title_with_dashes( 'Just a Slug¿', '', 'save' ) );
What happened?
I am running Gemini CLI in the WordPress/wordpress-develop codebase.
I check out a branch and I prompt Gemini with:
Then Gemini keeps spinning and spinning endlessly (longest I've waited before giving up is over 18 minutes) until I finally cancel the request. This issue has been happening consistently (maybe every time) for about a week now. I haven't been able to use Gemini in my workflow because of this. I just see this:
In this example, the diff I'm asking to review is quite small:
git diff trunk...What did you expect to happen?
Gemini should response with some result, not spin endlessly. There should at least be some timeout with an error message saying why it wasn't able to review the changes.
Client information
Login information
Google Account
Anything else we need to know?
No response