snowdriftcoop/snowdrift

Notification emails should have spaces before/after URLs

Closed this issue · 8 comments

The new-notification email doesn't leave spaces before/after URLs, which is standard in text-based email.

Someone replied to [your comment](https://snowdrift.coop/c/2914)! You can view the reply
+[here](https://snowdrift.coop/c/2916). *You can filter these notifications by adjusting the
+settings in your profile.*

If I click on the first link, this pops up:

This is because the email is pure Markdown. We're not going to change from using Markdown for the notifications on the site. The problem is that we don't have any different format implemented for sending by email. Anyway, this other ticket already existed: https://snowdrift.coop/p/snowdrift/w/en/notifications/c/2465

Anyway, this detail is actually a bug in your email client. In Thunderbird, the very same thing you posted is clickable and correct, it doesn't include the extra characters.

Closing this because the other ticket addresses the problem, if we fix that, we're good. There's no way to directly fix this separately.

Depending on what your email client is, it could also be an issue with your terminal emulator, not your mail client. In my case, mutt doesn't do anything special with uris, but Gnome Terminal does. I can control-click on them. They work fine for me.

However, I think it's maybe better to say that this is a duplicate of SD-594: "HTML e-mail option for notifications, or at least better than plain markdown" (the same link as Aaron's above).

It's an issue with termite, I think.

It's not an issue with Termite. It's an unfixable bug in Markdown. Markdown's URL syntax is ambiguous when it's used in unstructured text output (i.e. just treated as plain text) because ( and ) are valid as unescaped characters. The original URL RFC reserved < and > for delimiting URLs in text and they still have to be escaped today. GNOME Terminal has a buggy URL regexp which does handle this case as you want, but only because it's wrong in others.

Yeah, I was kinda afraid of that.

At any rate, I think that dumping markdown into a text document is
definitely a bad idea. Markdown is still a markup language, whether they
want it to be or not...

On Tue, Apr 28, 2015 at 11:25 AM, Daniel Micay notifications@github.com
wrote:

It's not an issue with Termite. It's an unfixable bug in Markdown.
Markdown's URL syntax is ambiguous when it's used in unstructured text
output (i.e. just treated as plain text) because ( and ) are valid as
unescaped characters. The original URL RFC reserved < and > for
delimiting URLs in text and they still have to be escaped today. GNOME
Terminal has a buggy URL regexp which does handle this case as you
want, but only because it's wrong in others.


Reply to this email directly or view it on GitHub
#306 (comment)
.

The only mostly working solution is a hack to look for a single pair of outer parentheses and ignore the trailing one but it's not really "correct". That's basically what GNOME Terminal does, but it has some other issues.

We could use the slightly less widespread markdown syntax of

[some link][1]

[1]: http://foo.bar/bazz/quux

adding that comment to the SD ticket, thanks