How to deal with slashes in note title with respect to wikilinks?

  • Obsidian 0.14.15
  • macOS 12.4

I was editing a note today and created a wikilink to a non-existent note that contained a slash. E.g. [[a note about birds/bees]]. I didn’t think about the filename when creating it.

Of course, upon clicking, what Obsidian did was create a folder named “a note about birds” and then a new file named “bees” inside. That’s definitely not what I wanted.

Just wondering if others have run into this, and if there are any better solutions or workarounds other than just being very mindful when forming links not to use any special characters.

Since you can’t use some characters in file name, I guess you can’t deal with slashes in note title…

edit: image in post above is an old one. in actual version I get

(Obsidian 0.14.6; macOS 11.6)

Hmm… I feel like / should be added to the list of characters not allowed in wikilink names then…

But wikilinks with slashes in them are perfectly valid. It’s a way of pointing to paths, especially when notes don’t have unique names.

And you would see slashes in all of your links if you had links set to “Relative path to vault” or “Absolute path in vault”.

I guess you’re right. Will just have to be more mindful when using slashes.

Perhaps submit a feature request for something like a momentary pop-up reminder (that can be disabled if desired, of course) that warns about what a slash in a new wikilink will do. Something like, “Note: This link ([[ABC/XYZ]]) will create a note named “XYZ” in vault folder “ABC” when clicked. If this was not your intent, remove the forward slash from the link text.”

Alternatively (or in addition?), the text on either side of the slash in the link could be colored differently to emphasize that it’s not an ordinary link.