whatwg-url
Advanced tools
Comparing version 6.4.1 to 6.5.0
@@ -66,2 +66,6 @@ "use strict"; | ||
function isNotSpecial(url) { | ||
return !isSpecialScheme(url.scheme); | ||
} | ||
function defaultPort(scheme) { | ||
@@ -362,3 +366,3 @@ return specialSchemes[scheme]; | ||
function parseHost(input, isSpecialArg) { | ||
function parseHost(input, isNotSpecialArg = false) { | ||
if (input[0] === "[") { | ||
@@ -372,3 +376,3 @@ if (input[input.length - 1] !== "]") { | ||
if (!isSpecialArg) { | ||
if (isNotSpecialArg) { | ||
return parseOpaqueHost(input); | ||
@@ -822,3 +826,3 @@ } | ||
const host = parseHost(this.buffer, isSpecial(this.url)); | ||
const host = parseHost(this.buffer, isNotSpecial(this.url)); | ||
if (host === failure) { | ||
@@ -846,3 +850,3 @@ return failure; | ||
const host = parseHost(this.buffer, isSpecial(this.url)); | ||
const host = parseHost(this.buffer, isNotSpecial(this.url)); | ||
if (host === failure) { | ||
@@ -986,3 +990,3 @@ return failure; | ||
} else { | ||
let host = parseHost(this.buffer, isSpecial(this.url)); | ||
let host = parseHost(this.buffer, isNotSpecial(this.url)); | ||
if (host === failure) { | ||
@@ -1126,4 +1130,6 @@ return failure; | ||
for (let i = 0; i < buffer.length; ++i) { | ||
if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || | ||
buffer[i] === 0x3C || buffer[i] === 0x3E) { | ||
if (buffer[i] < 0x21 || | ||
buffer[i] > 0x7E || | ||
buffer[i] === 0x22 || buffer[i] === 0x23 || buffer[i] === 0x3C || buffer[i] === 0x3E || | ||
(buffer[i] === 0x27 && isSpecial(this.url))) { | ||
this.url.query += percentEncode(buffer[i]); | ||
@@ -1130,0 +1136,0 @@ } else { |
{ | ||
"name": "whatwg-url", | ||
"version": "6.4.1", | ||
"version": "6.5.0", | ||
"description": "An implementation of the WHATWG URL Standard's URL API and parsing machinery", | ||
@@ -18,2 +18,3 @@ "main": "lib/public-api.js", | ||
"devDependencies": { | ||
"browserify": "^16.2.2", | ||
"domexception": "^1.0.1", | ||
@@ -34,2 +35,3 @@ "eslint": "^4.19.1", | ||
"pretest": "node scripts/get-latest-platform-tests.js && node scripts/transform.js && node scripts/convert-idl.js", | ||
"build-live-viewer": "browserify lib/public-api.js --standalone whatwgURL > live-viewer/whatwg-url.js", | ||
"test": "jest" | ||
@@ -36,0 +38,0 @@ }, |
@@ -7,3 +7,3 @@ # whatwg-url | ||
whatwg-url is currently up to date with the URL spec up to commit [7a3c69f](https://github.com/whatwg/url/commit/7a3c69f8a1583b33e730c3fea85141a618e7c697). | ||
whatwg-url is currently up to date with the URL spec up to commit [6ef17eb](https://github.com/whatwg/url/commit/6ef17ebe1220a7e7c0cfff0785017502ee18808b). | ||
@@ -10,0 +10,0 @@ ## API |
77124
2338
9