From 8a235c07f164d17d1b9c3082be1cff8ca133845f Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 15 Mar 2022 10:05:09 -0700 Subject: [PATCH] Fix et al. regex for sorting by creator \. -> \\. and apply the same escaping to general.and. --- chrome/content/zotero/itemTree.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index 978b97421d..5c53a1898b 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -1368,9 +1368,9 @@ var ItemTree = class ItemTree extends LibraryTree { // Extract the beginning of the string in non-greedy mode "^.+?" // up to either the end of the string, "et al." at the end of string - + "(?=(?: " + Zotero.getString('general.etAl').replace('.', '\.') + ")?$" + + "(?=(?: " + Zotero.getString('general.etAl').replace('.', '\\.') + ")?$" // or ' and ' - + "| " + Zotero.getString('general.and') + " " + + "| " + Zotero.getString('general.and').replace('.', '\\.') + " " + ")" );