From 98995d46d1059a54b49136ea56e7d8d9c6d11ee1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 25 Aug 2017 23:28:45 +0000 Subject: [PATCH] Formatting: In `sanitize_title_with_dashes()`, convert forward slash to hyphen on save. Props corvidism, jtsternberg, GhostToast, alxndr. Fixes #10792. Built from https://develop.svn.wordpress.org/trunk@41318 git-svn-id: http://core.svn.wordpress.org/trunk@41149 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 6acb459c26..911fb905f1 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2000,6 +2000,8 @@ function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'displa $title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title ); // Convert nbsp, ndash and mdash HTML entities to hyphens $title = str_replace( array( ' ', ' ', '–', '–', '—', '—' ), '-', $title ); + // Convert forward slash to hyphen + $title = str_replace( '/', '-', $title ); // Strip these characters entirely $title = str_replace( array( diff --git a/wp-includes/version.php b/wp-includes/version.php index 8eb8d4cf4c..6af748bc77 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41317'; +$wp_version = '4.9-alpha-41318'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.