mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
FIX: Allow user to quote Emojis.
This commit is contained in:
parent
9909c715dc
commit
c2eceaa50d
1 changed files with 4 additions and 1 deletions
|
@ -97,7 +97,10 @@ Discourse.Utilities = {
|
|||
// Strip out any .click elements from the HTML before converting it to text
|
||||
var div = document.createElement('div');
|
||||
div.innerHTML = html;
|
||||
$('.clicks', $(div)).remove();
|
||||
var $div = $(div);
|
||||
// Find all emojis and replace with its title attribute.
|
||||
$div.find('img.emoji').replaceWith(function() { return this.title });
|
||||
$('.clicks', $div).remove();
|
||||
var text = div.textContent || div.innerText || "";
|
||||
|
||||
return String(text).trim();
|
||||
|
|
Loading…
Reference in a new issue