snowdriftcoop / snowdrift

Infrastructure for Snowdrift.coop. This is a MIRROR of https://gitlab.com/snowdrift/snowdrift. Your issue reports and merge requests are welcome, but they will be moved to gitlab.com. You are encouraged to start there instead!
https://snowdrift.coop
GNU Affero General Public License v3.0
92 stars 36 forks source link

Notification emails should have spaces before/after URLs #306

Closed pharpend closed 9 years ago

pharpend commented 9 years ago

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:

wolftune commented 9 years ago

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.

chreekat commented 9 years ago

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).

pharpend commented 9 years ago

It's an issue with termite, I think.

thestinger commented 9 years ago

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.

chreekat commented 9 years ago

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 https://github.com/snowdriftcoop/snowdrift/issues/306#issuecomment-97162335 .

thestinger commented 9 years ago

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.

pharpend commented 9 years ago

We could use the slightly less widespread markdown syntax of

[some link][1]

[1]: http://foo.bar/bazz/quux
wolftune commented 9 years ago

adding that comment to the SD ticket, thanks