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
This commit is contained in:
@@ -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 );
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user