1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-02 12:47:41 +02:00

Review comments - escape vars in url

This commit is contained in:
Roman 2021-08-14 21:53:52 +01:00
parent ecf718005d
commit f0361bf80d

View File

@ -3,15 +3,15 @@ export function isCallbackUrl(s: string) {
} }
export function getNoteUrl(noteId: 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) { 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) { 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'; export type Command = 'openNote' | 'openFolder' | 'openTag';