-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
url: treat special characters in hostnames more strictly in url.parse()
Remove tabs/newlines/carriage returns, similar to WHATWG URL. Throw if ^, |, and some other special characters are in the hostname, similar to WHATWG URL. Use punycode/toAscii when % appears in a hostname, like WHATWG URL.
- Loading branch information
Showing
5 changed files
with
51 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
'use strict'; | ||
|
||
if (internalBinding('config').hasIntl) { | ||
const { toASCII, toUnicode } = internalBinding('icu'); | ||
module.exports = { toASCII, toUnicode }; | ||
} else { | ||
const { domainToASCII, domainToUnicode } = require('internal/url'); | ||
module.exports = { toASCII: domainToASCII, toUnicode: domainToUnicode }; | ||
} | ||
const { domainToASCII, domainToUnicode } = require('internal/url'); | ||
module.exports = { toASCII: domainToASCII, toUnicode: domainToUnicode }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters