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#.


  • 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

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


  • 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#

When using full path links, if a hash symbol (#) is part of a folder name it breaks the link entirely. The hash is also convert to a greater than symbol (>) in preview text.

Steps to reproduce

  • create a folder with a # character in the path
  • create a wikilink including the full path to a file in that folder
  • preview the file
  • hover/click the link in preview

Expected result

The link should preview the file on hover and take me to the file when clicked, the same as any other wikilink would.

Actual result

  • hovering over the link in preview informs you “{file} is not created yet, please click to create”
  • clicking the link (in preview or editor) generates an alert saying “file already exists”.
  • The # is converted into a > in the content. The actual link in devtools for the screenshot is:
<a data-href="PROJECTS/# Upgrade Obsidian/Holding Pen.md" href="PROJECTS/# Upgrade Obsidian/Holding Pen.md" class="internal-link is-unresolved" target="_blank" rel="noopener">PROJECTS/ &gt;  Upgrade Obsidian/Holding Pen.md</a>

The noticable thing to me is that the href is correct, but the # has been replaced with &gt; in the text. It’s also getting the class is-unresolved, even though that file exists.


  • Operating system: MacOS 11.1 on M1 chip
  • Obsidian version: 10.13

Additional information