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
This commit is contained in:
John Blackbourn 2016-03-05 03:56:27 +00:00
parent 0c1cca9961
commit 3184328ecb
2 changed files with 4 additions and 3 deletions

View File

@ -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 = '<strong>' . __( 'Permalink:' ) . "</strong>\n";
if ( false !== $view_link ) {
$return .= '<a id="sample-permalink" href="' . esc_url( $view_link ) . '"' . $preview_target . '>' . $view_link . "</a>\n";
$display_link = urldecode( $view_link );
$return .= '<a id="sample-permalink" href="' . esc_url( $view_link ) . '"' . $preview_target . '>' . $display_link . "</a>\n";
} else {
$return .= '<span id="sample-permalink">' . $permalink . "</span>\n";
}

View File

@ -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.