From 947717c3f5c7aa9ae91ad0c2095d67d05d47859b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 9 Oct 2024 13:47:30 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/12675 --- app/src/protyle/util/compatibility.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/protyle/util/compatibility.ts b/app/src/protyle/util/compatibility.ts index 5647f848e..c68cedb42 100644 --- a/app/src/protyle/util/compatibility.ts +++ b/app/src/protyle/util/compatibility.ts @@ -8,13 +8,13 @@ export const openByMobile = (uri: string) => { } if (isInIOS()) { if (uri.startsWith("assets/")) { - window.webkit.messageHandlers.openLink.postMessage(location.origin + "/" + uri); + window.webkit.messageHandlers.openLink.postMessage(encodeURI(location.origin + "/" + uri)); } else { try { new URL(uri); - window.webkit.messageHandlers.openLink.postMessage(uri); + window.webkit.messageHandlers.openLink.postMessage(encodeURI(uri)); } catch (e) { - window.webkit.messageHandlers.openLink.postMessage("https://" + uri); + window.webkit.messageHandlers.openLink.postMessage(encodeURI("https://" + uri)); } } } else if (isInAndroid()) {