@marianmeres/simple-router 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/route.js +5 -1
  2. package/package.json +2 -2
package/dist/route.js CHANGED
@@ -175,7 +175,11 @@ export class SimpleRoute {
175
175
  .replace(/&$/, "")
176
176
  .split("&")
177
177
  .reduce((memo, kvpair) => {
178
- const [k, v = ""] = kvpair.split("=");
178
+ // Split at the FIRST "=" only: a value may itself contain "="
179
+ // (base64 padding, a nested URL, ...).
180
+ const eqPos = kvpair.indexOf("=");
181
+ const k = eqPos === -1 ? kvpair : kvpair.slice(0, eqPos);
182
+ const v = eqPos === -1 ? "" : kvpair.slice(eqPos + 1);
179
183
  if (k.length) {
180
184
  try {
181
185
  const decodedKey = decodeURIComponent(k);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/simple-router",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "type": "module",
5
5
  "main": "dist/mod.js",
6
6
  "types": "dist/mod.d.ts",
@@ -21,7 +21,7 @@
21
21
  "author": "Marian Meres",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@marianmeres/pubsub": "^3.0.0"
24
+ "@marianmeres/pubsub": "^3.1.0"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",