From f1a70702342cce247cd5bff5ae51faee21422202 Mon Sep 17 00:00:00 2001 From: candela97 <54083835+candela97@users.noreply.github.com> Date: Fri, 27 Sep 2024 04:36:19 +0800 Subject: [PATCH] Avoid escaping reserved characters when formatting URL --- src/js/Core/Html/Html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/Core/Html/Html.ts b/src/js/Core/Html/Html.ts index 47e902704..74307f0d4 100644 --- a/src/js/Core/Html/Html.ts +++ b/src/js/Core/Html/Html.ts @@ -5,7 +5,7 @@ export default class HTML { static formatUrl(link: string): string { const protocolReg = /^[a-z]+:\/\//; const _link = protocolReg.test(link) ? link : `//${link}`; - return this.escape(_link); + return encodeURI(_link); } static escape(str: string): string {