From 256bd157edd7707aa1affa1822f68f41be1f988c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 7 Jun 2022 20:35:58 -0400 Subject: [PATCH] Properly strip ZWJ in `isOnlyEmoji()` --- chrome/content/zotero/xpcom/utilities_internal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js index 590ca20029..d95c7638d8 100644 --- a/chrome/content/zotero/xpcom/utilities_internal.js +++ b/chrome/content/zotero/xpcom/utilities_internal.js @@ -406,8 +406,8 @@ Zotero.Utilities.Internal = { }, isOnlyEmoji: function (str) { - // Remove emoji and Variation Selector-16 and see if anything's left - const re = /\p{Extended_Pictographic}|\uFE0F/gu; + // Remove emoji, Zero Width Joiner, and Variation Selector-16 and see if anything's left + const re = /\p{Extended_Pictographic}|\u200D|\uFE0F/gu; return !str.replace(re, ''); },