mity / md4c

C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.
MIT License
785 stars 146 forks source link

Tilde ~ is escaped in URLs #165

Closed dominickpastore closed 3 years ago

dominickpastore commented 3 years ago

MD4C converts ~ in URLs to %7E. This seems a little unusual to me since RFC 3986 includes it in the unreserved characters for URLs, and it's fairly common for user websites on shared institutional servers (e.g. http://www.example.com/~johndoe/).

Not that it's necessarily a bug, since the URLs still work, and CommonMark intentionally leaves this as an implementation detail. But given that unescaped tildes are so common in URLs elsewhere, it seemed like it might be unintentional.