www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 7cacff3a087559e765cf25dff256cffb1ddcb937
parent 754bcb0ec9f55598fbd2230c14113a019513e678
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon,  2 May 2011 15:39:48 +0000

Strip tabs from filenames


Diffstat:
Mchrome/content/zotero/xpcom/file.js | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js @@ -225,8 +225,8 @@ Zotero.File = new function(){ // TODO: use space instead, and figure out what's doing extra // URL encode when saving attachments that trigger this fileName = fileName.replace(/[\/\\\?%\*:|"<>]/g, ''); - // Replace newlines (which shouldn't be in the string in the first place) with spaces - fileName = fileName.replace(/\n/g, ' '); + // Replace newlines and tabs (which shouldn't be in the string in the first place) with spaces + fileName = fileName.replace(/\n\t/g, ' '); 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, '');