From 0d343458a35332c3319134adca024645e9af50f0 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 23 Mar 2016 03:23:13 -0400 Subject: [PATCH] Normalize Unicode in new filenames --- chrome/content/zotero/xpcom/file.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index 443a4153dd..629d5101e5 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -779,6 +779,9 @@ Zotero.File = new function(){ if (!skipXML) { // Strip characters not valid in XML, since they won't sync and they're probably unwanted fileName = fileName.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\ud800-\udfff\ufffe\uffff]/g, ''); + + // Normalize to NFC + fileName = fileName.normalize(); } // Don't allow hidden files fileName = fileName.replace(/^\./, '');