From c542e9f9d06d5c9ae9880aff9095b10df70d0c3c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 28 Feb 2008 22:01:56 +0000 Subject: [PATCH] urlencode only when needed. Props spikeyslam. see #5775 git-svn-id: https://develop.svn.wordpress.org/trunk@7096 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/pluggable.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 3a95a67316..5db5739a7d 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -1207,13 +1207,12 @@ function get_avatar( $id_or_email, $size = '64', $default = '' ) { if ( empty($default) ) $default = "http://www.gravatar.com/avatar.php?gravatar_id=ad516503a11cd5ca435acc9bb6523536&size=$size"; // ad516503a11cd5ca435acc9bb6523536 == md5('unknown@gravatar.com') - $default = urlencode( $default ); if ( !empty($email) ) { $out = 'http://www.gravatar.com/avatar.php?gravatar_id='; $out .= md5( strtolower( $email ) ); $out .= "&size={$size}"; - $out .= "&default={$default}"; + $out .= '&default=' . urlencode( $default ); $rating = get_option('avatar_rating'); if ( !empty( $rating ) )