Decode the sample permalink shown to the user. This avoids showing encoded non-Latin characters in the sample permalink.

Fixes #16496
Props linuxologos

Built from https://develop.svn.wordpress.org/trunk@30364


git-svn-id: http://core.svn.wordpress.org/trunk@30363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2014-11-17 03:00:21 +00:00
parent c61a028898
commit cd99d5915f

View File

@ -1223,7 +1223,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
}
$post_name_html = '<span id="editable-post-name" title="' . $title . '">' . $post_name_abridged . '</span>';
$display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, $permalink );
$display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, urldecode( $permalink ) );
$return = '<strong>' . __( 'Permalink:' ) . "</strong>\n";
$return .= '<span id="sample-permalink" tabindex="-1">' . $display_link . "</span>\n";