Add blank alt attribute to avatars.

This was giving an ugly border to avatars in the user card as the full size version loaded in Firefox.
This commit is contained in:
Ben Hadley-Evans
2015-04-14 12:28:39 +01:00
parent f996b77470
commit c3b461f58d
3 changed files with 7 additions and 7 deletions

View File

@ -137,15 +137,15 @@ test("avatarImg", function() {
var avatarTemplate = "/path/to/avatar/{size}.png";
equal(utils.avatarImg({avatarTemplate: avatarTemplate, size: 'tiny'}),
"<img width='20' height='20' src='/path/to/avatar/40.png' class='avatar'>",
"<img alt='' width='20' height='20' src='/path/to/avatar/40.png' class='avatar'>",
"it returns the avatar html");
equal(utils.avatarImg({avatarTemplate: avatarTemplate, size: 'tiny', title: 'evilest trout'}),
"<img width='20' height='20' src='/path/to/avatar/40.png' class='avatar' title='evilest trout'>",
"<img alt='' width='20' height='20' src='/path/to/avatar/40.png' class='avatar' title='evilest trout'>",
"it adds a title if supplied");
equal(utils.avatarImg({avatarTemplate: avatarTemplate, size: 'tiny', extraClasses: 'evil fish'}),
"<img width='20' height='20' src='/path/to/avatar/40.png' class='avatar evil fish'>",
"<img alt='' width='20' height='20' src='/path/to/avatar/40.png' class='avatar evil fish'>",
"it adds extra classes if supplied");
blank(utils.avatarImg({avatarTemplate: "", size: 'tiny'}),