hedgedoc / hedgedoc

HedgeDoc - Ideas grow better together

Home Page:https://hedgedoc.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Geo URI scheme

toastal opened this issue · comments

Is your feature request related to a problem? Please describe.

I should be able to link a Geo URI scheme like geo:25.1971382,55.2740943. Instead it is filtered out & the link redirects back to the document. This URI scheme is agnostic to any specific mapping application which makes it a better experience to share a location than link say a link to a proprietary application like Google Maps.

Describe the solution you'd like

[geo:25.1971382,55.2740943](geo:25.1971382,55.2740943) works as geo:25.1971382,55.2740943

Describe alternatives you've considered

Force users into a specific map application

Additional context

none

Looks like Microsoft GitHub’s Markdown fork also can’t support Geo URI schemes either :|

In case of HedgeDoc 2, this results from the usage of dompurify which sanitizes the generated HTML before being shown. They include a rather strict list of allowed URI protocols, however allow one to override that behavior.

We could now either compile a list of allowed URI protocols or rather do the opposite and allow everything except certain ones (like javascript: or vbscript:). I'd favor doing the latter.

Throw in mailto: & xmpp: then too ;P