Page MenuHomePhabricator

Support mailto URI in Remarkup
Closed, ResolvedPublic

Description

Seems like these syntaxes should work in Remarkup:

[[mailto:chad@phacility.com | Chad Little]]

Maybe should work too?

[Chad Little](mailto:chad@chadsdomain.com)

Event Timeline

chad raised the priority of this task from to Needs Triage.
chad updated the task description. (Show Details)
chad added a project: Remarkup.
chad updated the task description. (Show Details)
chad added subscribers: chad, epriestley, btrahan.

For all HTTP-like protocols (e.g., ftp), you can configure this by setting uri.allowed-protocols. You can add mailto there, too, but we assume protocols have the form proto://, not proto:, so only links like mailto://a@b.com will get linked. These don't work, because they try to send mail to literally //a@b.com

Allowing mailto: means special casing several levels of the parser. I don't think this opens up any new ground for us, since the only other protocol I can think of which behaves like this is javascript:, and we can never allow that.

I'm also not sure how broadly useful this feature is.

epriestley triaged this task as Wishlist priority.Oct 13 2013, 11:35 AM

Dear all, my expectation of mailto: handling was based on mediawiki behavior, where it is correctly interpreted.

epriestley edited this Maniphest Task.
epriestley edited this Maniphest Task.
devurandom reopened this task as Open.EditedJul 7 2015, 7:45 AM

As I see it, rP58fbb0ae532f implements parsing of mailto://. However this is, as you already mentioned, rather useless, because clicking the link will not allow to send an email (in KMail, it opens a new-mail window with an empty To: field). Is it possible to reconsider fixing this in a way that actually works?

Regarding your concern about no other protocols existing that would use the same scheme: RFC5341 defines the tel: scheme. There also exist doi:, sip:, skype:, xmpp:, bitcoin:, geo: (which actually can be observed in the wild) and others (which are less common).

Regarding rendering I propose to not output the protocol: prefix - i.e. render "tel:+1234" as "+1234" and include "tel:" only in the href.

epriestley claimed this task.

However this is, as you already mentioned, rather useless, because clicking the link will not allow to send an email

it-works@fine-after-D8963.com

Screen Shot 2015-07-07 at 5.29.41 AM.png (1×1 px, 75 KB)

Regarding your concern about no other protocols existing that would use the same scheme: RFC5341 defines the tel: scheme. There also exist doi:, sip:, skype:, xmpp:, bitcoin:, geo: (which actually can be observed in the wild) and others (which are less common).
Regarding rendering I propose to not output the protocol: prefix - i.e. render "tel:+1234" as "+1234" and include "tel:" only in the href.

We're satisfied with the current behavior and support. You can use [[ a | b ]] to change the title.