Escape late in get_avatar().

Merges [29397] to the 3.7 branch.

Built from https://develop.svn.wordpress.org/branches/3.7@29400


git-svn-id: http://core.svn.wordpress.org/branches/3.7@29178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-08-06 07:51:32 +00:00
parent b9739cae41
commit 8b02ba1d76
1 changed files with 2 additions and 1 deletions

View File

@ -1709,7 +1709,8 @@ function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
$out = str_replace( '&', '&', esc_url( $out ) );
$avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size} photo' height='{$size}' width='{$size}' />";
} else {
$avatar = "<img alt='{$safe_alt}' src='{$default}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";
$out = esc_url( $default );
$avatar = "<img alt='{$safe_alt}' src='{$out}' class='avatar avatar-{$size} photo avatar-default' height='{$size}' width='{$size}' />";
}
return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt);