Socket
Socket
Sign inDemoInstall

form-urlencoded

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

form-urlencoded - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

13

form-urlencoded.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc