mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 03:17:19 +08:00
FIX: Allow user to quote Emojis.
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user