Consistent escaping in wikilink titles

Previously raised as a bug report, but I was redirected here.


Escaping characters in wikilink title is inconsistent with how it works everywhere else.

[[Start Here|ab\cd\#ef]]

Produces text looking


Use case

Example use case for proper escaping is noting ranges of episodes or issues in the title (Amazing Spider Man (1963) #121-123), since without escaping “#”, a tag would be created.

Proposed solution

Make escaping work like everywhere else in the note.

This shouldn’t create a tag (and didn’t when I tried it) because number-only tags aren’t allowed. Tags - Obsidian Help

(The help post actually says a tag “must contain at least one non-numerical character”, and the dash would seem to qualify. I don’t know if that’s a bug or if it’s intentional that a tag with only numbers and a dash is invalid, but I think it’s sensible behavior).

It didn’t create a tag when I used valid tag text in a wikilink’s text, either.

Putting a valid tag in the text of a Markdown link (as in your second example if the backslash were removed) does add it to the tag index, so there is another inconsistency. I think it would be good to disallow that (but that’s another feature request).

related to Support Markdown markup in wikilink alias (like standard markdown links)

Dash qualifies and it does create a tag.


A workaround if all else fails … the fullwidth number sign parses without being treated as a hash:

Unicode: U+FF03, UTF-8: EF BC 83

## Markdown link
[markdown link](<Amazing Spider Man (1963) #121-123>)

## Wikilink
[[Amazing Spider Man (1963) #121-123]]

Live Preview incorrectly highlights it as a tag but it’s not one. If you switch to Reading View, which renders more accurately, you’ll see it’s not highlighted as a tag. And if you search tag:121-123 you’ll get 0 results because it hasn’t been indexed as a tag.

(I didn’t notice the highlight until I saw your screenshot because I have a snippet that makes tags look like links).