Obsidian URI link only works in Live Preview

It appears that all other types of links work in both Live Preview and Reading modes, except for [link](obsidian://open?vault=….) links. The obsidian links only work in live preview, but when I enter Read mode, it just shows the link as plain text (as it would appear in Source mode).

I’ve made sure there is an empty line above and below the link, and that it’s the only part of the line (not embedded in with other text), so as to eliminate any possible interference with adjacent formatting. I also put the same link into an otherwise empty document (no YAML block or anything else), and the same behavior exhibits itself.

I also tried going back to the default theme, without any change to the behavior.

I’m working on an M1 Mac and syncing to an iPhone, which has the same issue with that sort of link. OS version 15.3, Obsidian version 1.8.4., Theme: Primary

Source Mode:
image

Live Preview:
image

Reading Mode:
image

Hi.

You have spaces in Building Your Pteryx. Does it work correctly if you percent enocde the spaces or wrap the entire address in angle brackets:

[Updated Pteryx Type](<obsidian … the rest of the link here wrapped in angle brackets>)

The version below ‘works’ in a local test vault:

[Updated Pteryx Type](<obsidian://open?vault=Cypher%20SRD&file=Adventures%20and%20Campaigns%2FPredation%2FPredation%20Types#Building Your Pteryx>)

1 Like

I’m confused; the version you say “works” is exactly the same as the ones I shared. Out of curiosity, I did put %20 in the section name (different from what you posted), so it looks like this:

[Updated Pteryx Type](obsidian://open?vault=Cypher%20SRD&file=Adventures%20and%20Campaigns%2FPredation%2FPredation%20Types#Building%20%Your%20Pteryx)

That link does consistently stay a link in Read mode.

It’s very odd, though; this is the only such link that requires that treatment, the difference being that all of my other links are within the same vault.

This still seems like a bug to me. If Obsidian can render the link correctly in Live Preview, then surely it can also do that in Read mode.

Thanks for the work-around though!

1 Like

Basic treatment of links in Obsidian is documented in GitHub Flavored Markdown Spec:

A link destination consists of either

  • a sequence of zero or more characters between an opening < and a closing > that contains no line breaks or unescaped < or > characters, or
  • a nonempty sequence of characters that does not start with <, does not include ASCII space or control characters, and includes parentheses only if (a) they are backslash-escaped or (b) they are part of a balanced pair of unescaped parentheses. (Implementations may impose limits on parentheses nesting to avoid performance issues, but at least three levels of nesting should be supported.)
2 Likes

Hello.

No angle brackets

[Updated Pteryx Type](obsidian://open?vault=Cypher%20SRD&file=Adventures%20and%20Campaigns%2FPredation%2FPredation%20Types#Building Your Pteryx)

With angle brackets

[Updated Pteryx Type](<obsidian://open?vault=Cypher%20SRD&file=Adventures%20and%20Campaigns%2FPredation%2FPredation%20Types#Building Your Pteryx>)

I can’t see the angle brackets in your original screenshots. The difference with the one I wrote above is that the angle brackets can be used to make the link work without having to percent encode the spaces. Apologies if that wasn’t clear in my first answer or if I have misunderstood your recent post.

1 Like

I think this is looking at it a bit backwards. Live Preview is rendering the link incorrectly, or at least with relaxed standards, or possibly for draft-like convenience. And also I suppose with different rendering methods. Read Mode is rendering it correctly to its final form.

After one of the most recent updates, this bug was fixed. It now renders as a link in both live preview and read-only mode. So it was a bug, and it’s been solved.

2 Likes