block / block/buzz

Desktop: markdown links with obsidian:// look clickable but do nothing

Open
#5,857 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

**Describe the bug**

A markdown link whose href is an `obsidian://` URI renders as a normal underlined link in Desktop, but a click does nothing.

`buzzDeepLinkUrlTransform` keeps `buzz://message` and valid `buzz://pr|issue|repo` hrefs. Every other scheme goes to react-markdown `defaultUrlTransform`, which replaces unknown schemes with `""`. The `` stays styled. The href is empty.

**Steps to reproduce**

1. In any channel, post:

```
[Open in Obsidian](obsidian://open?vault=hive-vault&file=wiki%2Fexample)
```

2. Click the rendered link.

**Expected behavior**

The OS should receive `obsidian://open?vault=...&file=...` (same as `xdg-open` on Linux, or the registered handler on macOS/Windows). Obsidian opens the named vault file when that handler is installed.

**Actual behavior**

The label is underlined and looks tappable. The click is a no-op. Right-click "Copy link" has nothing useful to copy, because the href was already stripped.

The OS handler is not the failure. On Fedora, this works outside Buzz:

```
xdg-open 'obsidian://open?vault=hive-vault&file=wiki%2Fexample'
```

**Version and platform**

- Buzz version: 0.5.11 (`Buzz_0.5.11_amd64.AppImage`)
- OS: Fedora Linux 44
- The same transform is still on `main` (`desktop/src/shared/ui/markdown/utils.ts`). The desktop markdown tests document the strip (`desktop/src/shared/ui/markdown.test.mjs`, `javascript:` and non-entity `buzz://` cases).

**Logs / additional context**

Relevant code:

```ts
export function buzzDeepLinkUrlTransform(value: string, key: string): string {
if (key !== "href") return defaultUrlTransform(value);
if (isMessageLink(value)) return value;
if (parseEntityLink(value).ok) return value;
return defaultUrlTransform(value);
}
```

`ExternalLinkAnchor` then renders ``. When `href` is `""`, left-click has nowhere to go.

A tight fix is: allow `obsidian://open` (path `open` only) in `buzzDeepLinkUrlTransform`, add a regression test next to the existing scheme tests, and open that URI with the same OS opener the context menu already uses (`openUrl` from `@tauri-apps/plugin-opener`). A webview `target="_blank"` on a custom scheme may still no-op even after the href survives.

Mobile is a separate surface. Live mobile only launches `http`/`https`. Even after a desktop allowlist, a phone tap would still need its own handler.

Duplicates searched: none found for this sanitizer path.
Closest open issues (different problems):

- #4572 mobile: message links not tappable (http/https on mobile)
- #2433 feature request for a built-in Obsidian/Notion agent (not markdown hrefs)

None found among open PRs for `obsidian://` in `urlTransform`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.