Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't create podcast notes if they contain question mark in the title #97

Open
BartekR opened this issue May 24, 2024 · 3 comments
Open

Comments

@BartekR
Copy link

BartekR commented May 24, 2024

After the change 4c0a24e, I can't create notes of podcast episodes if they contain a question mark in the title.

I added this to a regex locally as a workaround, and it works again, but it will be lost after the next plugin update. Can you bring back the question mark removal when sanitizing the file name of the note being created?

Workaround that works for me (I used the asterisk again, just in case):

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

This also applies for downloading podcasts - podcasts with question marks in the podcast name or episode title will fail to save after downloading, due to the invalid file name.

@BartekR
Copy link
Author

BartekR commented Jul 24, 2024

The code without an asterisk works as well. After a recent upgrade, I had to fix it manually, so I tested another version.

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

@NewAiCoder
Copy link

this issue is still present with the current version... :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants