Skip to content

Commit

Permalink
Remove the restriction on adjacent hyphens in hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
chriso committed Feb 18, 2016
1 parent 20c8bdf commit 1db186a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion test/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ describe('Validators', function () {
, 'http://www.foobar.com:99999/'
, 'http://www.-foobar.com/'
, 'http://www.foobar-.com/'
, 'http://www.foo---bar.com/'
, 'http://foobar/# lol'
, 'http://foobar/? lol'
, 'http://foobar/ lol/'
Expand Down
3 changes: 0 additions & 3 deletions validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,6 @@
if (part[0] === '-' || part[part.length - 1] === '-') {
return false;
}
if (part.indexOf('---') >= 0 && part.slice(0, 4) !== 'xn--') {
return false;
}
}
return true;
};
Expand Down

0 comments on commit 1db186a

Please sign in to comment.