Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't autolink if authority is only "end" characters #15

Closed
robinst opened this issue Aug 31, 2017 · 2 comments
Closed

Don't autolink if authority is only "end" characters #15

robinst opened this issue Aug 31, 2017 · 2 comments

Comments

@robinst
Copy link
Owner

robinst commented Aug 31, 2017

See commonmark/commonmark-java#99, the following examples should not result in any links:

http://.
http://"
http://<space>

Note that http:// and http://. are valid URLs according to RFC 3986, because authority can be zero or more unreserved characters. But we don't autolink http:// on its own or the trailing . of http://example.org.

robinst added a commit that referenced this issue Aug 31, 2017
This change stops these and other examples from being linked:

    http://.
    http://"
    http://<space>

Note that `http://` and `http://.` are valid URLs according to RFC 3986,
because `authority` can be zero or more `unreserved` characters. But we
don't autolink `http://` on its own or the trailing `.` of
`http://example.org.`
@robinst
Copy link
Owner Author

robinst commented Aug 31, 2017

Pushed a fix, but keeping this open until I've released it.

@robinst
Copy link
Owner Author

robinst commented Aug 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant