form-urlencoded
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -46,4 +46,3 @@ // Filename: formurlencoded.js | ||
function getNestVals (name, value) { | ||
var whitespaceRe = /%20/g, | ||
encode = encodeURIComponent, | ||
var encode = encodeURIComponent, | ||
type = typeof value, | ||
@@ -69,11 +68,9 @@ f = null; | ||
function manuallyEncodeChar (ch) { | ||
return '%' + ('0' + ch.charCodeAt(0).toString(16)).slice(-2).toUpperCase(); | ||
} | ||
function formEncodeString (value) { | ||
return String(value) | ||
.replace(/[^ !'()~\*]*/g, encodeURIComponent) | ||
.replace(/ /g, '+') | ||
.replace(/[!'()~\*]/g, manuallyEncodeChar); | ||
.replace(/ /g, '+') | ||
.replace(/[!'()~\*]/g, function manuallyEncodeChar (ch) { | ||
return '%' + ('0' + ch.charCodeAt(0).toString(16)).slice(-2).toUpperCase(); | ||
}); | ||
} | ||
@@ -80,0 +77,0 @@ |
{ | ||
"name": "form-urlencoded", | ||
"main": "form-urlencoded", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": "Chris <chris@bumblehead.com>", | ||
@@ -6,0 +6,0 @@ "license" : "MIT", |
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
13650
217