Remove emojis fix

This commit is contained in:
Natsumi
2022-07-22 20:04:25 +12:00
parent 1978ef20c6
commit c4f5df70ef
+4 -1
View File
@@ -18516,7 +18516,7 @@ speechSynthesis.getVoices();
$app.methods.replaceBioSymbols = function (text) { $app.methods.replaceBioSymbols = function (text) {
if (!text) { if (!text) {
return void 0; return '';
} }
var symbolList = { var symbolList = {
'@': '', '@': '',
@@ -18556,6 +18556,9 @@ speechSynthesis.getVoices();
}; };
$app.methods.removeEmojis = function (text) { $app.methods.removeEmojis = function (text) {
if (!text) {
return '';
}
return text return text
.replace( .replace(
/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g, /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,