This is a major problem, and there is no reason it can’t be solved. Just replace special characters in a title with allowed characters, and keep the actual title under a variable somewhere. Or make the title and filename sepparate.
I advise using Web Clipper and under Note name, use the following replacements, for example:
{{title|replace:("/\//g":"⧸","/\\\\/g":"⧵","/:/g":"։","|":"❘","/#/g":"#","/\[/g":"〚","/\]/g":"〛","?":"?","/\"/g":"“")}}
and the same under Properties > title property key.
So in my case:
This is for Sunnaq445’s comment about Clipper:
The variable {{noteName}} is safe. For other text, you can use the safeName filter—it optionally lets you choose an OS’s ruleset if you don’t want the most restrictive safing.
New to me.
But better to have personal control, because I don’t like underscores (or hyphens, whatever gets generated) galore.
The replacements come from an array used in a script (plugin) I have that provide extra safety, because I don’t use Web Clipper all the time.
But WC sounded like a good start to put OP in the right direction and the method you pointed out may also suffice for them.
Cheers
You may want to upvote this feature request: Support any character in filenames / note title (using encoding, substitution, etc) and check its comments for solutions.
