obsidian-ReadItLater icon indicating copy to clipboard operation
obsidian-ReadItLater copied to clipboard

Remove Illegal characters from file name title generation

Open scottrlarson opened this issue 2 years ago • 2 comments

⚠️ Please check that this feature request hasn't been suggested before.

  • [X] I searched previous Ideas in Discussions didn't find any similar feature requests.
  • [X] I searched previous Issues didn't find any similar feature requests.

🔖 Feature description

When I clip a "Readable Article" page, the title gets copied verbatim from the site title including illegal characters like commas and quotes.

✔️ Solution

I would like ReaditLater to clip a page without illegal characters. Passing the operation through a regex expression.

❓ Alternatives

I was thinking about trying to pass the page creation process off to templater to rename the file, but I don't think ReaditLater Supports this.

📝 Additional Context

No response

scottrlarson avatar Oct 22 '23 16:10 scottrlarson

List of illegal characters already exists. I'm not aware that comma is illegal character in file names. Please provide your operating system and URL of article.

https://github.com/DominikPieper/obsidian-ReadItLater/blob/210d016b1038783e4f44615c4b1f0e24c9a2f19f/src/helpers/fileutils.ts#L18-L20

adamluckdev avatar Oct 22 '23 20:10 adamluckdev

Its not doing it now, it might have been a bug. Some of my entries had double quotes and & symbol characters. Ill report back if I can recreate it. But maybe you should consider stripping anything that is not alpha numeric except for dashes, underscores and the like. Commas and single quotes are a problem in linux. Thanks for the response.

scottrlarson avatar Oct 22 '23 23:10 scottrlarson