Steps to reproduce
Inserting a | character anywhere in the name of note file by renaming it
- either inline (typically in the Files Explorer : F2 shortcut)
- or via the input box (“Rename” entry of the tab contextual menu)
pops up a red box (very likely an error message, but no text displayed, or can’t be read…) :
- input box : the file can NOT be saved.
- inline : it CAN, and NO trouble with internal links (creation & clicking).
Besides - with the Web clipper browser plugin, these filtering instructions in the template’s note name field do not override the default behavior :
- `{{title|safe_name:linux}}
- `{{title|replace:“|”:“*”}}
So, how many bugs actually ?
1 with Obsidian + 1 with Web Clipper ?
Why is char * filtered too ?
Expected result
Ideally, characters supported by the OS file system AND not conflicting with markdown internal links syntax should be allowed for naming a note file. Either by default (according to the OS Obsidian is installed on) or when explicitly requested (safe_name filter).
Also, the replace filter should not further extend the set of (considered as) “invalid characters” mentioned on help page for internal links : # | ^ : %% [[ ]] does not include *. How many other “invalid” chars ?
Consistency, accuracy
Help on the topic is confusing, since it says
- “may not work”, without any precision : in which cases ?
- “we recommend avoiding”, not we systematically filter.
And concludes with a link to safe filename practices, a distinct set of forbidden characters for each of the 3 major OS : Linux, Windows, macOS. So, why so many with Obsidian under Linux ? Why char | since no trouble with links ? Which ones must really be avoided, always filtered ? Does safe_name:linux differ from safe_name:windows?…
Wondering
How many reasons why some characters are filtered for file naming, considered “invalid” ?
Default setting for Use [[Wikilinks]] : one of them ?
‘Upstream’ concern for Obsidian Publish : another one ? Could it be that names making the local files & directories tree are used ‘as is’ when publishing ? Even when the Publish plugin, and the Wikilinks setting, are disabled ?…
If the case - any,
Help could at least be improved : make the point clear.
Ideally,
the user would be offered the option - when disabling the Publish plugin or/and Wikilinks setting, to switch off related restrictions on file naming. A message would warn about the consequences, Help be updated accordingly : the user fully informed than switching back on, might not be trouble free - for the Publish plugin, only. But one should know when creating a vault, whether it is for personal use (private knowledge management, nice & smart notebook) or for online publishing (& how : Publish core plugin, any community one, SSG software). If not so sure : option left unchecked.
This would offer finer tuning to one’s needs & likes, without really impeding on the built-in publishing feature : one’s own informed choice. And many facilities allow oneself to perform targeted search, bulk adjustment if ever required, manual ones if few of them.
Would make Obsidian still more versatile, for the cost of a rather limited code re-engineering. Additional benefit : clearer separation of concerns, use cases, information models = improved maintainability, architecture.