From 4cff1c8f84519dd6d89a805218ffe68dcecd3cdf Mon Sep 17 00:00:00 2001 From: qwe7002 Date: Mon, 16 Dec 2024 17:18:59 +0800 Subject: [PATCH 1/2] Fixed the issue where spaces were incorrectly converted to + --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 70272b8..8f4f98f 100644 --- a/main.js +++ b/main.js @@ -245,15 +245,15 @@ class Handler { let title = parameters.title || undefined if (title) { - title = decodeURIComponent(title) + title = decodeURIComponent(title.replaceAll("\\+","%20")) } let subtitle = parameters.subtitle || undefined if (subtitle) { - subtitle = decodeURIComponent(subtitle) + subtitle = decodeURIComponent(subtitle.replaceAll("\\+","%20")) } let body = parameters.body || undefined if (body) { - body = decodeURIComponent(body) + body = decodeURIComponent(body.replaceAll("\\+","%20")) } if (!title && !subtitle && !body) { @@ -531,4 +531,4 @@ class Util { } } -const util = new Util() \ No newline at end of file +const util = new Util() From 832637c268cfff09a74eed566d2ddff4e73058d9 Mon Sep 17 00:00:00 2001 From: qwe7002 Date: Mon, 16 Dec 2024 17:33:58 +0800 Subject: [PATCH 2/2] Fixed the issue where spaces were incorrectly converted to + --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 8f4f98f..2bb1bcb 100644 --- a/main.js +++ b/main.js @@ -245,15 +245,15 @@ class Handler { let title = parameters.title || undefined if (title) { - title = decodeURIComponent(title.replaceAll("\\+","%20")) + title = decodeURIComponent(title.replaceAll("+","%20")) } let subtitle = parameters.subtitle || undefined if (subtitle) { - subtitle = decodeURIComponent(subtitle.replaceAll("\\+","%20")) + subtitle = decodeURIComponent(subtitle.replaceAll("+","%20")) } let body = parameters.body || undefined if (body) { - body = decodeURIComponent(body.replaceAll("\\+","%20")) + body = decodeURIComponent(body.replaceAll("+","%20")) } if (!title && !subtitle && !body) {