planka icon indicating copy to clipboard operation
planka copied to clipboard

Links to application URL dont work

Open bigrup opened this issue 2 years ago • 6 comments

Hello,

I'm trying to link to an external application, but the link inside Planka doesn't appear to be passing the URL to the browser.

I'm trying to open a specific obsidian note. When you use obisidian you can get an external deeplinked URL for that note, in this format

obsidian://open?vault=xxx&file=yyyy

I've tried putting this in raw, and also in the markdown format in the 'description' section of a note. [linktonote](obsidian://...)

The browser launches a new tab, but the URL is not transferred so the tab is blank.

i'm wondering if its a security concern and that its being dropped because its not using the http(s) schema...

Am I just doing this wrong or does this not work please?

bigrup avatar Sep 25 '23 17:09 bigrup

Just to add some extra context, I tried this yesterday and it seems when I hover on the link it has a javascript:void(0) link which behaves as expected above, opens an empty new tab.

I wanted to also verify that my browser actually supports those links, so I copy and pasted the link into the browser, and it did indeed switch to obsidian app and open the correct note.

coalwater avatar Oct 06 '23 08:10 coalwater

Hi! We use the default react-markdown url transformer. Custom protocols can easily be excluded from sanitization, but this can add security issues. For example, on GitHub you cannot use protocols other than http/https in Markdown and there's clearly something behind it. We'll probably add the most common protocols to the exceptions, but we'll look into this first to see what problems there might be with it.

meltyshev avatar Oct 13 '23 12:10 meltyshev

I think a good in between option would be to allow a list of protocols via an environment variable, not much UI is needed to support it. Does this sound like something easy/easier to implement ?

coalwater avatar Oct 20 '23 15:10 coalwater

Or how about having a option in preferences to enable all protocols? With some kind of warning when it is checked?

The default settings would still have it disabled.

santosh avatar Nov 10 '23 17:11 santosh

Or how about having a option in preferences to enable all protocols? With some kind of warning when it is checked?

The default settings would still have it disabled.

That's also a good idea!

meltyshev avatar Nov 10 '23 20:11 meltyshev