DavidAnson / markdownlint

A Node.js style checker and lint tool for Markdown/CommonMark files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Umlauts like Ä, Ö, Ü in Mailadresses/URLs are not detected as normal letters

leanderbuerkin opened this issue · comments

The Mailaddress

<küche@tf.de>

is automatically formatted to

<kü<che@tf.de>>
```.

Is that intended?

MD034 reports: Bare URL used [Context: "che@tf.de"]

So it looks like the umlaut character is not allowed in an email address. That appears to be the case for the parser which limits that section to ASCII alphanumeric: https://github.com/micromark/micromark-extension-gfm-autolink-literal?tab=readme-ov-file#syntax

Rendering of the sample input via the parser markdownlint uses is the same as what happens on GitHub - the first two characters are not part of the link: https://dlaa.me/markdownlint/#%25m%3Ck%C3%BCche%40tf.de%3E%0A

So I think the current behavior is correct (and consistent with GitHub) based on how email addresses are defined and corresponding autolink behavior.

Alright, we could solve our problem from the other direction: kueche@tf.de is forwarded to the same e-mailaddress (or is the same address?).

I doubt that would go to the same person. I think the recommendation is probably to "percent encode" the umlaut character. or maybe ask the person who owns that alias as this is probably something they have dealt with before.

https://en.m.wikipedia.org/wiki/Percent-encoding

Thanks for the pointers. I found two workarounds that work, when markdown automatic links (<...>) are used.

  • <k%C3%BCche@tf.de> as suggested by you. Works as markdown automatic link but not as a GFM automatic link (meaning just k%C3%BCche@tf.de without <> does not work).
  • <mailto:küche@tf.de> works as well.

A quick note on standards: from a quick read I understand that basic SMTP does not allow non-ascii characters in addresses. SMTPUTF8 (RFC6531 through RFC6533) adds this but is only from around 2012 and thus quite new (atleast for an internet standard).

TL;DR: While this is annoying I expect that the workarounds are sufficient for us.

Great, thank you for the update!