From c3b461f58d20c413469c2248b08f20356449e5a7 Mon Sep 17 00:00:00 2001 From: Ben Hadley-Evans Date: Tue, 14 Apr 2015 12:28:39 +0100 Subject: [PATCH] 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. --- app/assets/javascripts/discourse/lib/utilities.js | 2 +- spec/components/pretty_text_spec.rb | 6 +++--- test/javascripts/lib/utilities-test.js.es6 | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/utilities.js b/app/assets/javascripts/discourse/lib/utilities.js index 11f5af292..f51fd4d46 100644 --- a/app/assets/javascripts/discourse/lib/utilities.js +++ b/app/assets/javascripts/discourse/lib/utilities.js @@ -51,7 +51,7 @@ Discourse.Utilities = { var classes = "avatar" + (options.extraClasses ? " " + options.extraClasses : ""); var title = (options.title) ? " title='" + Handlebars.Utils.escapeExpression(options.title || "") + "'" : ""; - return ""; + return ""; }, tinyAvatar: function(avatarTemplate, options) { diff --git a/spec/components/pretty_text_spec.rb b/spec/components/pretty_text_spec.rb index 57576faca..5b1dfd26c 100644 --- a/spec/components/pretty_text_spec.rb +++ b/spec/components/pretty_text_spec.rb @@ -17,15 +17,15 @@ describe PrettyText do end it "produces a quote even with new lines in it" do - expect(PrettyText.cook("[quote=\"EvilTrout, post:123, topic:456, full:true\"]ddd\n[/quote]")).to match_html "" + expect(PrettyText.cook("[quote=\"EvilTrout, post:123, topic:456, full:true\"]ddd\n[/quote]")).to match_html "" end it "should produce a quote" do - expect(PrettyText.cook("[quote=\"EvilTrout, post:123, topic:456, full:true\"]ddd[/quote]")).to match_html "" + expect(PrettyText.cook("[quote=\"EvilTrout, post:123, topic:456, full:true\"]ddd[/quote]")).to match_html "" end it "trims spaces on quote params" do - expect(PrettyText.cook("[quote=\"EvilTrout, post:555, topic: 666\"]ddd[/quote]")).to match_html "" + expect(PrettyText.cook("[quote=\"EvilTrout, post:555, topic: 666\"]ddd[/quote]")).to match_html "" end end diff --git a/test/javascripts/lib/utilities-test.js.es6 b/test/javascripts/lib/utilities-test.js.es6 index c73153f7d..75d4f14b8 100644 --- a/test/javascripts/lib/utilities-test.js.es6 +++ b/test/javascripts/lib/utilities-test.js.es6 @@ -137,15 +137,15 @@ test("avatarImg", function() { var avatarTemplate = "/path/to/avatar/{size}.png"; equal(utils.avatarImg({avatarTemplate: avatarTemplate, size: 'tiny'}), - "", + "", "it returns the avatar html"); equal(utils.avatarImg({avatarTemplate: avatarTemplate, size: 'tiny', title: 'evilest trout'}), - "", + "", "it adds a title if supplied"); equal(utils.avatarImg({avatarTemplate: avatarTemplate, size: 'tiny', extraClasses: 'evil fish'}), - "", + "", "it adds extra classes if supplied"); blank(utils.avatarImg({avatarTemplate: "", size: 'tiny'}),