Render emoji in conversation and inbox views.
This commit is contained in:
parent
99d599e008
commit
254131488e
7 changed files with 34 additions and 5 deletions
|
@ -64,4 +64,15 @@ describe('MessageView', function() {
|
|||
assert.include(view.$el.text(), xss); // should appear as escaped text
|
||||
assert.strictEqual(view.$el.find('script').length, 0); // should not appear as html
|
||||
});
|
||||
|
||||
it('supports twemoji', function() {
|
||||
message.set('body', 'I \u2764\uFE0F emoji!');
|
||||
var view = new Whisper.MessageView({model: message});
|
||||
view.render();
|
||||
var img = view.$el.find('.content img');
|
||||
assert.strictEqual(img.length, 1);
|
||||
assert.strictEqual(img.attr('src'), '/components/twemoji/16x16/2764.png');
|
||||
assert.strictEqual(img.attr('alt'), '\u2764\uFE0F');
|
||||
assert.strictEqual(img.attr('class'), 'emoji');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue