fast-uri 2.3.1 → 2.4.0

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.
package/index.js CHANGED
@@ -273,7 +273,7 @@ function parse (uri, opts) {
273
273
  parsed.host = unescape(parsed.host)
274
274
  }
275
275
  if (parsed.path !== undefined && parsed.path.length) {
276
- parsed.path = encodeURI(parsed.path)
276
+ parsed.path = escape(unescape(parsed.path))
277
277
  }
278
278
  if (parsed.fragment !== undefined && parsed.fragment.length) {
279
279
  parsed.fragment = encodeURI(decodeURI(parsed.fragment))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fast-uri",
3
3
  "description": "Dependency free RFC 3986 URI toolbox",
4
- "version": "2.3.1",
4
+ "version": "2.4.0",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
7
  "types": "types/index.d.ts",
@@ -9,6 +9,7 @@ test('compatibility Parse', (t) => {
9
9
  const toParse = [
10
10
  '//www.g.com/error\n/bleh/bleh',
11
11
  'https://fastify.org',
12
+ '/definitions/Record%3Cstring%2CPerson%3E',
12
13
  '//10.10.10.10',
13
14
  '//10.10.000.10',
14
15
  '//[2001:db8::7%en0]',