Strip potentially invalid characters in auto-generated attachment filenames

This commit is contained in:
Dan Stillman 2007-03-24 22:57:14 +00:00
parent d803831856
commit 13d5d59b01

View File

@ -716,6 +716,9 @@ Zotero.Attachments = new function(){
// Title
formatString = rpl('title', formatString);
// Strip potentially invalid characters
// See http://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words
formatString = formatString.replace(/[\/\\\?\*:|"<>\.]/g, '');
return formatString;
}