From 8b0e4662322f8d22e7c068f00d94a5dce5bf592b Mon Sep 17 00:00:00 2001 From: Nikolay Bachiyski Date: Tue, 21 Jun 2016 14:45:54 +0000 Subject: [PATCH] Admin: escape URL-encoded permalinks git-svn-id: https://develop.svn.wordpress.org/trunk@37801 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/post.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index bd58325d9a..757a160238 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -1319,7 +1319,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { if ( false !== $view_link ) { $display_link = urldecode( $view_link ); - $return .= '' . $display_link . "\n"; + $return .= '' . esc_html( $display_link ) . "\n"; } else { $return .= '' . $permalink . "\n"; } @@ -1343,14 +1343,14 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { } } - $post_name_html = '' . $post_name_abridged . ''; - $display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, urldecode( $permalink ) ); + $post_name_html = '' . esc_html( $post_name_abridged ) . ''; + $display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, esc_html( urldecode( $permalink ) ) ); $return = '' . __( 'Permalink:' ) . "\n"; $return .= '' . $display_link . "\n"; $return .= '‎'; // Fix bi-directional text display defect in RTL languages. $return .= '\n"; - $return .= '' . $post_name . "\n"; + $return .= '' . esc_html( $post_name ) . "\n"; } /**