Skip to content

Commit c4c7f23

Browse files
committed
Build 1.2.2
1 parent ed09b76 commit c4c7f23

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

dist/Autolinker.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* Autolinker.js
3-
* 1.2.1
3+
* 1.2.2
44
*
55
* Copyright(c) 2016 Gregory Jacobs <[email protected]>
66
* MIT License
@@ -240,7 +240,7 @@ Autolinker.parse = function( textOrHtml, options ) {
240240
*
241241
* Ex: 0.25.1
242242
*/
243-
Autolinker.version = '1.2.1';
243+
Autolinker.version = '1.2.2';
244244

245245

246246
Autolinker.prototype = {
@@ -3802,8 +3802,8 @@ Autolinker.matcher.UrlMatchValidator = {
38023802
( protocolUrlMatch && !this.isValidUriScheme( protocolUrlMatch ) ) ||
38033803
this.urlMatchDoesNotHaveProtocolOrDot( urlMatch, protocolUrlMatch ) || // At least one period ('.') must exist in the URL match for us to consider it an actual URL, *unless* it was a full protocol match (like 'http://localhost')
38043804
(this.urlMatchDoesNotHaveAtLeastOneWordChar( urlMatch, protocolUrlMatch ) && // At least one letter character must exist in the domain name after a protocol match. Ex: skip over something like "git:1.0"
3805-
!this.isValidIpAddress( urlMatch ) // Except if it's an IP address
3806-
)
3805+
!this.isValidIpAddress( urlMatch )) || // Except if it's an IP address
3806+
this.containsMultipleDots( urlMatch )
38073807
) {
38083808
return false;
38093809
}
@@ -3819,6 +3819,10 @@ Autolinker.matcher.UrlMatchValidator = {
38193819
return uriScheme !== null;
38203820
},
38213821

3822+
containsMultipleDots : function ( urlMatch ) {
3823+
return urlMatch.indexOf("..") > -1;
3824+
},
3825+
38223826
/**
38233827
* Determines if the URI scheme is a valid scheme to be autolinked. Returns
38243828
* `false` if the scheme is 'javascript:' or 'vbscript:'
@@ -3887,6 +3891,7 @@ Autolinker.matcher.UrlMatchValidator = {
38873891
}
38883892

38893893
};
3894+
38903895
/*global Autolinker */
38913896
/**
38923897
* A truncation feature where the ellipsis will be placed at the end of the URL.

0 commit comments

Comments
 (0)