Don't include date line when generating filename for annotations note
Since in many locales it would contain slashes and colons, both of which would be stripped in the filename, leaving long strings of numbers in the filename
This commit is contained in:
parent
5eee488e20
commit
a2458614df
1 changed files with 6 additions and 1 deletions
|
@ -81,7 +81,12 @@ Zotero_File_Exporter.prototype.save = async function () {
|
|||
}
|
||||
|
||||
if (this.items.length == 1) {
|
||||
let noteTitle = Zotero.Utilities.Item.noteToTitle(this.items[0].getNote());
|
||||
let noteTitle = Zotero.Utilities.Item.noteToTitle(
|
||||
this.items[0].getNote(),
|
||||
// Stop at <br/> to exclude date from annotation notes, which won't be a valid
|
||||
// filename in many locales
|
||||
{ stopAtLineBreak: true }
|
||||
);
|
||||
if (noteTitle) {
|
||||
this.name = Zotero.File.getValidFileName(noteTitle);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue