Skip to content

Enhancement: Additional External URI Protocol Recognition #191

@xrxca

Description

@xrxca

Currently only http:// https:// and mailto: links are recognized as external links.
It would be nice if other external URIs where recognized specifically:

  • ssh: Secure Shell
  • tel: Telephone

I've been trying NoteDiscovery for my technical notes and so far I quite like it, however for console access to virtual machines and servers, I use ssh: URI's extensively in proxmox descriptions and would like to be able to use them in my notes. Also my desktop is setup to pass tel: links to my phone system, and my mobile handles tel: links as well.

I'll admit that the ssh: scheme is not commonly used, and there are probably other protocols that someone else would use, so maybe a config setting with a list of prefix's that are considered external besides http://, https://, //, mailto:, and /api/

I tested this and it seems adding tel: to the list works, but adding ssh: doesn't (no longer thinks it a note, but doesn't handle the link at all, maybe it's an upstream issue),
frontent/app.js would need to be modified (~2499)
from:

// Check if it's an external link or API path (media files, etc.)
if (href.startsWith('http://') || href.startsWith('https://') || href.startsWith('//') || href.startsWith('mailto:') || href.startsWith('/api/')) {
    return; // Let external links and API paths work normally
}

to:

// Check if it's an external link or API path (media files, etc.)
if (href.startsWith('http://') || href.startsWith('https://') || href.startsWith('//') || href.startsWith('mailto:') || href.startsWith('tel:') || href.startsWith('ssh:') || href.startsWith('/api/')) {
    return; // Let external links and API paths work normally
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions