You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Review comments - escape vars in url
This commit is contained in:
@ -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';
|
||||||
|
Reference in New Issue
Block a user