I just recently submitted an answer written in the new editor that contained an email:


After I posted it, I clicked 'edit', switched to rich text mode, made some changes and submitted my edits. However, the email became a link:


When I use the old editor this doesn't happen, so I suppose this is a bug.

Note that I can't even remove mailto in the new editor... I can only remove it by switching back to CommonMark mode.

Only HTTP and HTTPS links are allowed in posts (along with relative and protocol-relative URLs), and using other types of links (other protocols such as mailto along with relative fragments) will result in the link being stripped out.

  • 14
    Even if it is not a bug but somehow "by design" that feature should be disabled. Do not linkify emails, ever.
    – rene
    Sep 25, 2021 at 7:11
  • 2
    The Stacks editor uses the markdown-it library to parse CommonMark, apparently with the linkify option set to true (default is false). This option uses the linkify-it library (ref) that converts emails to links by default (ref). Sep 25, 2021 at 13:01
  • 3
    Lines 274-278 in markdown-parser.test.ts indicate that developers are indeed aware of this particular auto-linking behaviour. Sep 25, 2021 at 13:05
  • 1
    @double-beep there are a few issues with the implementation though. Even though it renders as a link in wysiwyg mode, when you save, it is not linked anymore. Also, more strangely, if you surround the email address with double quotes, the email address isn't linked AND mailto: is included as literal text. Sep 25, 2021 at 17:30
  • @double-beep here is the revision that I made on one of U12-Forward's post that led to this bug report: meta.stackexchange.com/revisions/370234/2. Notice that "team@stackoverflow.com" got changed to "mailto:team@stackoverflow.com" Sep 25, 2021 at 17:32
  • As far as I know, bug reports for the "new" editor are still being collected as answers on the question: "Opt-in alpha test for a new Stacks editor", rather than as separate bug report questions. This question should be deleted and the bug report reposted as an answer on the announcement question.
    – Makyen
    Sep 25, 2021 at 17:43
  • @rene Yeah! I agree! Sep 26, 2021 at 1:51
  • @double-beep Ah Sep 26, 2021 at 1:51
  • I guess give this 6-8 weeks to solve :) Sep 26, 2021 at 5:18
  • I opened a PR that addresses this question. We now only have to wait 6-8 weeks for the devs to merge it. Sep 27, 2021 at 18:34
  • 2
    The solution here may be a bit more complicated than the proposed PR to just disable it. mailto links are allowed within Teams and the feature is intended to be available for users there.
    – animuson StaffMod
    Jan 13 at 21:14
  • @animuson mailto:abc@example.com will be linked, abc@example.com will not. Jan 15 at 10:04


You must log in to answer this question.

Browse other questions tagged .