From c8cc97dd9723962938bcc179d417f45a83553576 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 87bbe46615..00ea03dc1b 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, ''); },