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 ) )
|
||||
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 );
|
||||
|
||||
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 );
|
||||
echo $before, $link, $after;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue