From 91c375523228ebf7754daf6b8cd162a0545b6c4b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 3 Sep 2022 00:02:17 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/4511 --- app/src/menus/protyle.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index e8b888cbc..b02aea9be 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -720,7 +720,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText inputElement.addEventListener("input", (event: KeyboardEvent) => { if (!event.isComposing) { // https://github.com/siyuan-note/siyuan/issues/4511 - linkElement.innerHTML = Lute.EscapeHTMLStr(inputElement.value.replace(/\\]/g, "]").replace(/\\\[/g, "[")) || ""; + linkElement.innerHTML = Lute.EscapeHTMLStr(inputElement.value).replace(/\\]/g, '\\]').replace(/\\\[/g, '\\[') || ""; } }); inputElement.addEventListener("keydown", (event) => {