Poor Handling of `#` character in the filepath (aka hashtag, pound, octothorpe)

Step to reproduce:
1 - Create a Zettelkasten note: 202007131500
2 - Edit the Zettelkasten note title: 202007131500 #NewName
3 - Open graph view
4 - Click on the node for Zettelkasten note: 202007131500 #NewName

Expected result:
1 - Open the Zettelkasten note: 202007131500 #NewName

Actual result:
1 - Create a duplicate note: 202007131500
2 - Open the duplicate note: 202007131500
3- Keeps creating duplicate whenever user clicks on the node

EDIT: Add missing link screenshot in preview mode

Ok, the problem is with the # in the title. we’ll look into it

EDIT: Add missing link screenshot in preview mode in original post

So I looked more into this. It’s not related at all to the zattelklasten. It’s the # in the filename that creates problems. The same things happens when you click on a link like this [[[[aaaa #bb]]]] in preview.

Quick Switcher does not handles files with trailing ‘#’:

  • if you enter test# in Quick Switcher and press Enter the file test.md will be created
  • if file test#.md already exists entering te and choosing test# from the dropdown menu will create (or open) test.md instead.

This is important to me because I’m a musician, and many of my notes are ending with musical notes names. For example: Altissimo F#.

Environment

  • Operating system: macOS Big Sur
  • Obsidian version: 0.8.0

Additional information

1 Like

We don’t handle # well as a trailing character because we use # for addressing sections. Maybe we could escape the char somehow. We’ll think if & how to handle this corner case.

@Valery_Kondakoff , generally not a good idea to use on of these chars in filenames if you ever intend to share them with anyone outside your computer (the Web, Linux, Windows etc.).

You could consider changing the filenames to, say, Altissimo F Sharp or something like this, although I can see how plain # is useful and neat for you.

By accident I renamed a note “Note” -> “## Note”.
When I then renamed it back “## Note” -> “Note”, all the links did not get updated back to “Note” but stayed pointing to "[[## Note]].

Thanks, I can repro.

Steps to reproduce

  1. Create a file name that includes a #. Eg “test # test”
  2. Create another file, and link to the first.
  3. Attempt to open the first file via the link.
  4. Observe how you cannot because the # is read as a header link.

Expected result

Either:
A) #s are banned in file names (just like ? / < etc). I prefer this option.
B) #s in file names allow the files to be linked to.

Actual result

#s in file names are not banned, and they do not allow the file to be linked

Environment

  • Operating system: Ubuntu 18.04
  • Obsidian version: 0.10.1

Additional information

I know this is a weird bug hehe. I stumbled upon it because I was trying to create notes on c#