Comparing version 0.5.3 to 0.5.4
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.5.4](https://github.com/nuxt-contrib/ufo/compare/v0.5.3...v0.5.4) (2021-01-07) | ||
### Bug Fixes | ||
* enable plus encoding for query value ([82ab3f1](https://github.com/nuxt-contrib/ufo/commit/82ab3f17de0088529bb25f1b0ed31ab09443ed26)) | ||
### [0.5.3](https://github.com/nuxt-contrib/ufo/compare/v0.5.2...v0.5.3) (2021-01-06) | ||
@@ -7,0 +14,0 @@ |
@@ -97,2 +97,3 @@ 'use strict'; | ||
const IM_RE = /\?/g; | ||
const PLUS_RE = /\+/g; | ||
const ENC_BRACKET_OPEN_RE = /%5B/g; | ||
@@ -105,2 +106,3 @@ const ENC_BRACKET_CLOSE_RE = /%5D/g; | ||
const ENC_CURLY_CLOSE_RE = /%7D/g; | ||
const ENC_SPACE_RE = /%20/g; | ||
function encode(text) { | ||
@@ -113,3 +115,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(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(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, "^"); | ||
} | ||
@@ -116,0 +118,0 @@ function encodeQueryKey(text) { |
{ | ||
"name": "ufo", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"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
36971
834