hono 4.8.7 → 4.8.8

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/README.md CHANGED
@@ -6,13 +6,6 @@
6
6
 
7
7
  <hr />
8
8
 
9
- <p align="center">
10
- <a href="https://hono.dev"><b>Documentation 👉 hono.dev</b></a><br />
11
- <i>Now supports <a href="https://jsr.io/@hono/hono">JSR</a> and <code>deno.land/x</code> is deprecated! See <a href="docs/MIGRATION.md">Migration guide</a>.</i>
12
- </p>
13
-
14
- <hr />
15
-
16
9
  [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/honojs/hono/ci.yml?branch=main)](https://github.com/honojs/hono/actions)
17
10
  [![GitHub](https://img.shields.io/github/license/honojs/hono)](https://github.com/honojs/hono/blob/main/LICENSE)
18
11
  [![npm](https://img.shields.io/npm/v/hono)](https://www.npmjs.com/package/hono)
@@ -239,7 +239,8 @@ const getQueryParams = (url, key) => {
239
239
  const decodeURIComponent_ = decodeURIComponent;
240
240
  const safeEncodeURI = (str) => {
241
241
  try {
242
- return encodeURI(decodeURI(str));
242
+ const decoded = decodeURI(str);
243
+ return decoded === str ? encodeURI(str) : str;
243
244
  } catch (e) {
244
245
  if (e instanceof URIError) {
245
246
  return encodeURI(str);
package/dist/utils/url.js CHANGED
@@ -205,7 +205,8 @@ var getQueryParams = (url, key) => {
205
205
  var decodeURIComponent_ = decodeURIComponent;
206
206
  var safeEncodeURI = (str) => {
207
207
  try {
208
- return encodeURI(decodeURI(str));
208
+ const decoded = decodeURI(str);
209
+ return decoded === str ? encodeURI(str) : str;
209
210
  } catch (e) {
210
211
  if (e instanceof URIError) {
211
212
  return encodeURI(str);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "4.8.7",
3
+ "version": "4.8.8",
4
4
  "description": "Web framework built on Web Standards",
5
5
  "main": "dist/cjs/index.js",
6
6
  "type": "module",