Skip to content

Commit

Permalink
Gravatar plugin: escape ampersands in URLs
Browse files Browse the repository at this point in the history
Fixes #21804
  • Loading branch information
dregad committed Oct 20, 2016
1 parent 44151b6 commit fa2e717
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions plugins/Gravatar/Gravatar.php
Expand Up @@ -147,8 +147,15 @@ function user_get_avatar( $p_event, $p_user_id, $p_size = 80 ) {

# Build Gravatar URL
$t_avatar_url = self::getAvatarUrl() .
'avatar/' . $t_email_hash . '?d=' . $t_default_avatar .
'&r=' . $t_rating . '&s=' . $p_size;
'avatar/' . $t_email_hash . '?' .
http_build_query(
array(
'd' => $t_default_avatar,
'r' => $t_rating,
's' => $p_size,
),
'', '&'
);

$t_avatar = new Avatar();
$t_avatar->image = $t_avatar_url;
Expand Down

0 comments on commit fa2e717

Please sign in to comment.