From cddbe6fe1debc4f457d4567791f9a98500690145 Mon Sep 17 00:00:00 2001 From: JamesChan <38025067+xeden3@users.noreply.github.com> Date: Wed, 12 Apr 2023 18:25:01 +0800 Subject: [PATCH] Fix, a ' symbol in the title Fix, when there is a ' symbol in the title, the format of the generated json is wrong --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 94b8225..6265215 100644 --- a/src/index.ts +++ b/src/index.ts @@ -61,6 +61,7 @@ joplin.plugins.register({ case 'edit': let diagramResource = await getDiagramResource(request.diagramId); let data_json = diagramResource.data_json; + data_json = data_json.replace(/\'/g, "\\u0027"); await open_edit_dlg(data_json, request.diagramId, "edit"); return case 'check':