Admin: escape URL-encoded permalinks
git-svn-id: https://develop.svn.wordpress.org/trunk@37801 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f28d567989
commit
8b0e466232
@ -1319,7 +1319,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
|||||||
|
|
||||||
if ( false !== $view_link ) {
|
if ( false !== $view_link ) {
|
||||||
$display_link = urldecode( $view_link );
|
$display_link = urldecode( $view_link );
|
||||||
$return .= '<a id="sample-permalink" href="' . esc_url( $view_link ) . '"' . $preview_target . '>' . $display_link . "</a>\n";
|
$return .= '<a id="sample-permalink" href="' . esc_url( $view_link ) . '"' . $preview_target . '>' . esc_html( $display_link ) . "</a>\n";
|
||||||
} else {
|
} else {
|
||||||
$return .= '<span id="sample-permalink">' . $permalink . "</span>\n";
|
$return .= '<span id="sample-permalink">' . $permalink . "</span>\n";
|
||||||
}
|
}
|
||||||
@ -1343,14 +1343,14 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$post_name_html = '<span id="editable-post-name">' . $post_name_abridged . '</span>';
|
$post_name_html = '<span id="editable-post-name">' . esc_html( $post_name_abridged ) . '</span>';
|
||||||
$display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, urldecode( $permalink ) );
|
$display_link = str_replace( array( '%pagename%', '%postname%' ), $post_name_html, esc_html( urldecode( $permalink ) ) );
|
||||||
|
|
||||||
$return = '<strong>' . __( 'Permalink:' ) . "</strong>\n";
|
$return = '<strong>' . __( 'Permalink:' ) . "</strong>\n";
|
||||||
$return .= '<span id="sample-permalink"><a href="' . esc_url( $view_link ) . '"' . $preview_target . '>' . $display_link . "</a></span>\n";
|
$return .= '<span id="sample-permalink"><a href="' . esc_url( $view_link ) . '"' . $preview_target . '>' . $display_link . "</a></span>\n";
|
||||||
$return .= '‎'; // Fix bi-directional text display defect in RTL languages.
|
$return .= '‎'; // Fix bi-directional text display defect in RTL languages.
|
||||||
$return .= '<span id="edit-slug-buttons"><button type="button" class="edit-slug button button-small hide-if-no-js" aria-label="' . __( 'Edit permalink' ) . '">' . __( 'Edit' ) . "</button></span>\n";
|
$return .= '<span id="edit-slug-buttons"><button type="button" class="edit-slug button button-small hide-if-no-js" aria-label="' . __( 'Edit permalink' ) . '">' . __( 'Edit' ) . "</button></span>\n";
|
||||||
$return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
|
$return .= '<span id="editable-post-name-full">' . esc_html( $post_name ) . "</span>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user