[GH-ISSUE #910] New rule proposal: no URL-encoded links #548

Open
opened 2026-03-03 01:27:55 +03:00 by kerem · 1 comment
Owner

Originally created by @queengooborg on GitHub (Jul 17, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/910

This rule came to mind when running into a Prettier bug with links that have HTTP encoding in them. It would be awesome to see a rule that prevents HTTP encoding within links -- since browsers automatically re-encode links as needed, it would also help with readability when looking at the raw Markdown.

For example, /fr/docs/Web/JavaScript/Tableaux_typ%C3%A9s would be disallowed and must be converted to /fr/docs/Web/JavaScript/Tableaux_typés.

(I can also see the possibility of a configuration option that inverts this rule, so that links must be HTTP encoded, but in a world where Unicode exists, I doubt this option would have much benefit.)

Edit: I realize that %20 is actually a good case of where HTTP encoding should be used. Maybe a configurable allow list should be a thing?

Originally created by @queengooborg on GitHub (Jul 17, 2023). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/910 This rule came to mind when running into a Prettier bug with links that have HTTP encoding in them. It would be awesome to see a rule that prevents HTTP encoding within links -- since browsers automatically re-encode links as needed, it would also help with readability when looking at the raw Markdown. For example, `/fr/docs/Web/JavaScript/Tableaux_typ%C3%A9s` would be disallowed and must be converted to `/fr/docs/Web/JavaScript/Tableaux_typés`. (I can also see the possibility of a configuration option that inverts this rule, so that links _must_ be HTTP encoded, but in a world where Unicode exists, I doubt this option would have much benefit.) **Edit:** I realize that `%20` is actually a good case of where HTTP encoding _should_ be used. Maybe a configurable `allow` list should be a thing?
Author
Owner

@drewmullen commented on GitHub (Feb 14, 2025):

I can also see the possibility of a configuration option that inverts this rule, so that links must be HTTP encoded, but in a world where Unicode exists, I doubt this option would have much benefit.

This is what I was hoping for. Terraform modules display their README in the Terraform registry. Links that are internal only [see here](./here.png) break when displayed in the registry.

<!-- gh-comment-id:2659713000 --> @drewmullen commented on GitHub (Feb 14, 2025): > I can also see the possibility of a configuration option that inverts this rule, so that links must be HTTP encoded, but in a world where Unicode exists, I doubt this option would have much benefit. This is what I was hoping for. Terraform modules display their README in the Terraform registry. Links that are internal only `[see here](./here.png)` break when displayed in the registry.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#548
No description provided.