From 6231990c837c12814a65b3a9bf323b10f4daac13 Mon Sep 17 00:00:00 2001 From: starswolf <51693312+starswolf@users.noreply.github.com> Date: Wed, 22 Sep 2021 17:25:00 +0800 Subject: [PATCH] Add encoding step when setting href --- src/core/cache-storage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/cache-storage.ts b/src/core/cache-storage.ts index 2be98ed..23cf67c 100644 --- a/src/core/cache-storage.ts +++ b/src/core/cache-storage.ts @@ -11,8 +11,8 @@ export class CacheStorage { return 'about:blank'; } - link.href = url; - link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/ + link.href = encodeURI(url); + link.href = encodeURI(link.href); // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/ return link.protocol + link.hostname + link.port; }