]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/post-template.php
Wordpress 4.5.3
[autoinstalls/wordpress.git] / wp-includes / post-template.php
index 3da42457c8c74cdaea5435909bc1b9345a9d58c9..8085745199b330d807deaf73bbeef81a19f2d91e 100644 (file)
@@ -1465,7 +1465,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals
         * @param bool         $icon      Whether to include an icon. Default false.
         * @param string|bool  $text      If string, will be link text. Default false.
         */
-       return apply_filters( 'wp_get_attachment_link', "<a href='$url'>$link_text</a>", $id, $size, $permalink, $icon, $text );
+       return apply_filters( 'wp_get_attachment_link', "<a href='" . esc_url( $url ) . "'>$link_text</a>", $id, $size, $permalink, $icon, $text );
 }
 
 /**