Skip to content

Commit

Permalink
Proper fix for gravatar URL '&' encoding
Browse files Browse the repository at this point in the history
This partially reverts the change introduced in issue #21804 (see commit
fa2e717), letting the caller escape the
URL as needed.

Fixes #21844
  • Loading branch information
dregad committed Nov 12, 2016
1 parent d47f367 commit aa2a3c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions core/classes/TimelineEvent.class.php
Expand Up @@ -80,9 +80,9 @@ public function html_start() {

return sprintf(
'<div class="entry"><div class="avatar"><a href="%s"><img class="avatar" src="%s" alt="%s" width="32" height="32" /></a></div><div class="timestamp">%s</div>',
$t_avatar->link,
$t_avatar->image,
$t_avatar->text,
htmlspecialchars( $t_avatar->link ),
htmlspecialchars( $t_avatar->image ),
htmlspecialchars( $t_avatar->text ),
$this->format_timestamp( $this->timestamp )
);
}
Expand Down
3 changes: 1 addition & 2 deletions plugins/Gravatar/Gravatar.php
Expand Up @@ -153,8 +153,7 @@ function user_get_avatar( $p_event, $p_user_id, $p_size = 80 ) {
'd' => $t_default_avatar,
'r' => $t_rating,
's' => $p_size,
),
'', '&amp;'
)
);

$t_avatar = new Avatar();
Expand Down

0 comments on commit aa2a3c0

Please sign in to comment.