diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 78f488c427..2f97869a8e 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1313,15 +1313,15 @@ 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 ) ) ); $pretty_permalink = str_replace( array( '%pagename%', '%postname%' ), $post_name, urldecode( $permalink ) ); $return = '' . __( 'Permalink:' ) . "\n"; $return .= '' . $display_link . "\n"; $return .= '‎'; // Fix bi-directional text display defect in RTL languages. $return .= '' . __( 'Edit' ) . "\n"; - $return .= '' . $post_name . "\n"; + $return .= '' . esc_html( $post_name ) . "\n"; } if ( isset( $view_post ) ) { @@ -1335,7 +1335,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { $pretty_permalink = $permalink; } - $return .= "$view_post\n"; + $return .= "$view_post\n"; } }