Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link with different protocol #738

Closed
primeinc opened this issue Mar 22, 2016 · 7 comments
Closed

Link with different protocol #738

primeinc opened this issue Mar 22, 2016 · 7 comments

Comments

@primeinc
Copy link

If I add a link like this on a non root page

**TS:** [ts.example.com](rdp://ts.example.com)

generates a link for rdp://ts.example.com/whatever/sub_folder/

I'd expect it to generate a link to: rdp://ts.example.com

Is this an issue with parsedown?

@flaviocopes
Copy link
Contributor

Confirmed, looks like an issue in Grav. Using protocols other than http or https get the page path appended.

@flaviocopes
Copy link
Contributor

For the time being, use a plain html URL:

**TS:** <a href="rdp://ts.example.com">ts.example.com </a>

@flaviocopes
Copy link
Contributor

@rhukster was able to fix this by adding the protocol to ParsedownGravTrait::$special_protocols, is this the right way?

@flaviocopes
Copy link
Contributor

Or should it actually do the opposite? Whitelist http/https and leave the others unchanged?

@rhukster
Copy link
Member

It probably makes more sense to whitelist known correct protocols and attempt to retrieve the correct grav-related path, and leave all others as-is.

@rhukster
Copy link
Member

Fixed in develop branch

@smz
Copy link

smz commented Apr 11, 2016

👍 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants