mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:21:04 +08:00
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:
@ -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'}),
|
||||
|
Reference in New Issue
Block a user