Make WordPress Core


Ignore:
Timestamp:
04/23/2010 09:23:32 PM (15 years ago)
Author:
westi
Message:

Switch to using esc_url{_raw} for the shortlink output as it is a url not just any attribute. Fixes #10640.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r14207 r14208  
    22052205        return;
    22062206
    2207     echo "<link rel='shortlink' href='" . esc_attr( $shortlink ) . "' />\n";
     2207    echo "<link rel='shortlink' href='" . esc_url_raw( $shortlink ) . "' />\n";
    22082208}
    22092209
     
    22552255
    22562256    if ( !empty( $shortlink ) ) {
    2257         $link = '<a rel="shortlink" href="' . esc_attr( $shortlink ) . '" title="' . $title . '">' . $text . '</a>';
     2257        $link = '<a rel="shortlink" href="' . esc_url( $shortlink ) . '" title="' . $title . '">' . $text . '</a>';
    22582258        $link = apply_filters( 'the_shortlink', $link, $shortlink, $text, $title );
    22592259        echo $before, $link, $after;
Note: See TracChangeset for help on using the changeset viewer.