From f0361bf80d3a1cd56f37d9c1cfd1b115a6df82ea Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 14 Aug 2021 21:53:52 +0100 Subject: [PATCH] Review comments - escape vars in url --- packages/lib/ProtocolUtils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/lib/ProtocolUtils.ts b/packages/lib/ProtocolUtils.ts index 2c70a5732..65549e8c1 100644 --- a/packages/lib/ProtocolUtils.ts +++ b/packages/lib/ProtocolUtils.ts @@ -3,15 +3,15 @@ export function isCallbackUrl(s: string) { } export function getNoteUrl(noteId: string) { - return `joplin://x-callback-url/openNote?id=${noteId}`; + return `joplin://x-callback-url/openNote?id=${encodeURIComponent(noteId)}`; } export function getFolderUrl(folderId: string) { - return `joplin://x-callback-url/openFolder?id=${folderId}`; + return `joplin://x-callback-url/openFolder?id=${encodeURIComponent(folderId)}`; } export function getTagUrl(tagId: string) { - return `joplin://x-callback-url/openTag?id=${tagId}`; + return `joplin://x-callback-url/openTag?id=${encodeURIComponent(tagId)}`; } export type Command = 'openNote' | 'openFolder' | 'openTag';