From c5d9d5cc1824fa04e6200bb2706548a46b87a44f Mon Sep 17 00:00:00 2001 From: Nikolay Bachiyski Date: Tue, 21 Jun 2016 14:46:49 +0000 Subject: [PATCH] Admin: escape URL-encoded permalinks Built from https://develop.svn.wordpress.org/trunk@37801 git-svn-id: http://core.svn.wordpress.org/trunk@37766 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index bd58325d9a..757a160238 100644 --- a/wp-admin/includes/post.php +++ b/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"; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 78d3fa42f5..4e34318a30 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37779'; +$wp_version = '4.6-alpha-37801'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.