Comparing version 0.5.0 to 0.5.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.5.1](https://github.com/nuxt-contrib/ufo/compare/v0.5.0...v0.5.1) (2020-12-16) | ||
### Bug Fixes | ||
* update encodeQueryValue to match URL spec for space and plus ([9446d9c](https://github.com/nuxt-contrib/ufo/commit/9446d9c3f0decaa76754ab74954905375e3b0fc7)) | ||
## [0.5.0](https://github.com/nuxt-contrib/ufo/compare/v0.4.0...v0.5.0) (2020-12-16) | ||
@@ -7,0 +14,0 @@ |
@@ -97,3 +97,2 @@ 'use strict'; | ||
const IM_RE = /\?/g; | ||
const PLUS_RE = /\+/g; | ||
const ENC_BRACKET_OPEN_RE = /%5B/g; | ||
@@ -106,3 +105,2 @@ const ENC_BRACKET_CLOSE_RE = /%5D/g; | ||
const ENC_CURLY_CLOSE_RE = /%7D/g; | ||
const ENC_SPACE_RE = /%20/g; | ||
function encode(text) { | ||
@@ -115,3 +113,3 @@ return encodeURI("" + text).replace(ENC_PIPE_RE, "|").replace(ENC_BRACKET_OPEN_RE, "[").replace(ENC_BRACKET_CLOSE_RE, "]"); | ||
function encodeQueryValue(text) { | ||
return encode(text).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^"); | ||
return encode(text).replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^"); | ||
} | ||
@@ -118,0 +116,0 @@ function encodeQueryKey(text) { |
{ | ||
"name": "@nuxt/ufo", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "URL utils for humans", | ||
@@ -5,0 +5,0 @@ "repository": "nuxt-contrib/ufo", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35905
830