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) => {