Fix localhost links
This commit is contained in:
+2
-1
@@ -12,8 +12,9 @@ const negatedDomainCharacterSet = '[^\\da-z\\.-]+';
|
|||||||
const domainBodyClause = '(' + domainCharacterSet + ')';
|
const domainBodyClause = '(' + domainCharacterSet + ')';
|
||||||
const tldClause = '([a-z\\.]{2,6})';
|
const tldClause = '([a-z\\.]{2,6})';
|
||||||
const ipClause = '((\\d{1,3}\\.){3}\\d{1,3})';
|
const ipClause = '((\\d{1,3}\\.){3}\\d{1,3})';
|
||||||
|
const localHostClause = '(localhost)';
|
||||||
const portClause = '(:\\d{1,5})';
|
const portClause = '(:\\d{1,5})';
|
||||||
const hostClause = '((' + domainBodyClause + '\\.' + tldClause + ')|' + ipClause + ')' + portClause + '?';
|
const hostClause = '((' + domainBodyClause + '\\.' + tldClause + ')|' + ipClause + '|' + localHostClause + ')' + portClause + '?';
|
||||||
const pathClause = '(\\/[\\/\\w\\.-]*)*';
|
const pathClause = '(\\/[\\/\\w\\.-]*)*';
|
||||||
const queryStringClause = '(\\?[\\w\\[\\]\\(\\)\\/\\?\\!#@$&\'*+,:;]*)?';
|
const queryStringClause = '(\\?[\\w\\[\\]\\(\\)\\/\\?\\!#@$&\'*+,:;]*)?';
|
||||||
const negatedPathCharacterSet = '[^\\/\\w\\.-]+';
|
const negatedPathCharacterSet = '[^\\/\\w\\.-]+';
|
||||||
|
|||||||
Reference in New Issue
Block a user