diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/url.js b/lib/url.js index 5d59d3c10f..2db780c7eb 100644 --- a/lib/url.js +++ b/lib/url.js @@ -319,7 +319,10 @@ Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { // It only converts parts of the domain name that // have non-ASCII characters, i.e. it doesn't matter if // you call it with a domain that already is ASCII-only. - this.hostname = toASCII(this.hostname); + + // Use lenient mode (`true`) to try to support even non-compliant + // URLs. + this.hostname = toASCII(this.hostname, true); } var p = this.port ? ':' + this.port : ''; |