Make WordPress Core


Ignore:
Timestamp:
03/05/2016 03:55:33 AM (9 years ago)
Author:
johnbillion
Message:

Posts, Post Types: Ensure that non-ASCII characters in attachment slugs aren't shown in urlencoded form in the sample permalink UI.

Fixes #35980

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/post.php

    r36659 r36853  
    13031303            } else {
    13041304                // Allow non-published (private, future) to be viewed at a pretty permalink.
    1305                 $view_link = str_replace( array( '%pagename%', '%postname%' ), $post->post_name, urldecode( $permalink ) );
     1305                $view_link = str_replace( array( '%pagename%', '%postname%' ), $post->post_name, $permalink );
    13061306            }
    13071307        }
     
    13131313
    13141314        if ( false !== $view_link ) {
    1315             $return .= '<a id="sample-permalink" href="' . esc_url( $view_link ) . '"' . $preview_target . '>' . $view_link . "</a>\n";
     1315            $display_link = urldecode( $view_link );
     1316            $return .= '<a id="sample-permalink" href="' . esc_url( $view_link ) . '"' . $preview_target . '>' . $display_link . "</a>\n";
    13161317        } else {
    13171318            $return .= '<span id="sample-permalink">' . $permalink . "</span>\n";
Note: See TracChangeset for help on using the changeset viewer.