Autolink should validate domain name #231

Closed
opened 2026-01-29 14:30:55 +00:00 by claunia · 1 comment
Owner

Originally created by @yufeih on GitHub (Oct 2, 2018).

GFM Spec defines autolink as:

An extended www autolink will be recognized when the text www. is found followed by a valid domain. A valid domain consists of alphanumeric characters, underscores (_), hyphens (-) and periods (.). There must be at least one period, and no underscores may be present in the last two segments of the domain.

An extended url autolink will be recognised when one of the schemes http://, https://, or ftp://, followed by a valid domain, then zero or more non-space non-< characters according to extended autolink path validation

Links like https://[your-domain]/api will not be treated as autolink

https://github.com/dotnet/docfx/issues/3272

Originally created by @yufeih on GitHub (Oct 2, 2018). [GFM Spec](https://github.github.com/gfm/#extended-www-autolink) defines autolink as: > An extended www autolink will be recognized when the text www. is found **followed by a valid domain**. A valid domain consists of alphanumeric characters, underscores (_), hyphens (-) and periods (.). There must be at least one period, and no underscores may be present in the last two segments of the domain. > An extended url autolink will be recognised when one of the schemes http://, https://, or ftp://, **followed by a valid domain**, then zero or more non-space non-< characters according to extended autolink path validation Links like _https://[your-domain]/api_ will not be treated as autolink https://github.com/dotnet/docfx/issues/3272
claunia added the enhancementPR Welcome! labels 2026-01-29 14:30:55 +00:00
Author
Owner

@MihaZupan commented on GitHub (Oct 6, 2018):

I made the changes needed for this (with tests).
The only problem I have is with committing the updated Specs.cs file (see #253)

@MihaZupan commented on GitHub (Oct 6, 2018): I made the changes needed for this (with tests). The only problem I have is with committing the updated Specs.cs file (see #253)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#231