anpigon / obsidian-book-search-plugin

Obsidian plugin that automatically creates notes by searching for books

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot create title with question mark in it

fishcasa opened this issue · comments

commented

When I find a book in search and try to add it, if it has a "?" in the title, the note fails to create and I get the following error
Error: file name cannot contain any of the following characters:

It would be great if there was an opportunity to edit the proposed title and continue with creation.

image

image

image

Windows 11
Obsidian 0.16.5
Book Search Plugin 0.5.8

Having the same issue, however I have noticed that titles with ampersands are having them deleted automatically and the file is created. Would it be possible to simply have the file creation delete the question mark? I'm not sure if colons in a title (title:subtitle) are auto adjusted.

Colons do autodelete for file names.
Screenshot (337)

I was just starting to check this plugin out and I hit this problem on the first book I looked for. It's definitely a show stopper for being able to use this to build a book catalog.

+1, it would be nice if there was a way to clean the illegal characters from the book title.

For example, Movies script and Videogame script do something like this to clean it up:

function replaceIllegalFileNameCharactersInString(string) {
  return string.replace(/[\\,#%&\{\}\/*<>?$\'\":@]*/g, "");
}