mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Switch to using esc_url{_raw} for the shortlink output as it is a url not just any attribute. Fixes #10640.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e88b66ee00
commit
ca0b2d6088
@ -2204,7 +2204,7 @@ function wp_shortlink_wp_head() {
|
|||||||
if ( empty( $shortlink ) )
|
if ( empty( $shortlink ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
echo "<link rel='shortlink' href='" . esc_attr( $shortlink ) . "' />\n";
|
echo "<link rel='shortlink' href='" . esc_url_raw( $shortlink ) . "' />\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2254,7 +2254,7 @@ function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
|
|||||||
$shortlink = wp_get_shortlink( $post->ID );
|
$shortlink = wp_get_shortlink( $post->ID );
|
||||||
|
|
||||||
if ( !empty( $shortlink ) ) {
|
if ( !empty( $shortlink ) ) {
|
||||||
$link = '<a rel="shortlink" href="' . esc_attr( $shortlink ) . '" title="' . $title . '">' . $text . '</a>';
|
$link = '<a rel="shortlink" href="' . esc_url( $shortlink ) . '" title="' . $title . '">' . $text . '</a>';
|
||||||
$link = apply_filters( 'the_shortlink', $link, $shortlink, $text, $title );
|
$link = apply_filters( 'the_shortlink', $link, $shortlink, $text, $title );
|
||||||
echo $before, $link, $after;
|
echo $before, $link, $after;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user