robinst / autolink-java

Java library to extract links (URLs, email addresses) from plain text; fast, small and smart
MIT License
207 stars 40 forks source link

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

Closed robinst closed 7 years ago

robinst commented 7 years ago

See https://github.com/atlassian/commonmark-java/issues/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 commented 7 years ago

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

robinst commented 7 years ago

Released in 0.7.0: https://github.com/robinst/autolink-java/blob/master/CHANGELOG.md#070---2017-08-31