diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 2ebe3483e..835c69f49 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -184,7 +184,7 @@ function get_attachment_link($id = false) { else $name = $object->post_name; if (strpos($parentlink, '?') === false) - $link = trailingslashit($parentlink) . $name . '/'; + $link = user_trailingslashit( trailingslashit($parentlink) . $name ); } if (! $link ) {