From 3184328ecb0581e7abc7e58da1b1e34cbac68ccd Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 5 Mar 2016 03:56:27 +0000 Subject: [PATCH] Posts, Post Types: Ensure that non-ASCII characters in attachment slugs aren't shown in urlencoded form in the sample permalink UI. Fixes #35980 Built from https://develop.svn.wordpress.org/trunk@36853 git-svn-id: http://core.svn.wordpress.org/trunk@36820 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 5 +++-- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 37366b3d14..2a41442534 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1302,7 +1302,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { $view_link = get_permalink( $post ); } else { // Allow non-published (private, future) to be viewed at a pretty permalink. - $view_link = str_replace( array( '%pagename%', '%postname%' ), $post->post_name, urldecode( $permalink ) ); + $view_link = str_replace( array( '%pagename%', '%postname%' ), $post->post_name, $permalink ); } } } @@ -1312,7 +1312,8 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { $return = '' . __( 'Permalink:' ) . "\n"; if ( false !== $view_link ) { - $return .= '' . $view_link . "\n"; + $display_link = urldecode( $view_link ); + $return .= '' . $display_link . "\n"; } else { $return .= '' . $permalink . "\n"; } diff --git a/wp-includes/version.php b/wp-includes/version.php index f3b9213378..b6f8a91b20 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-beta2-36852'; +$wp_version = '4.5-beta2-36853'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.