From 88de8806086f760c635cef5c00ca35c8cf09106a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 15 Nov 2024 23:39:14 +0800 Subject: [PATCH] :bug: https://github.com/siyuan-note/siyuan/issues/13155 --- app/src/block/util.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/block/util.ts b/app/src/block/util.ts index 272c2422d..dac72c1dd 100644 --- a/app/src/block/util.ts +++ b/app/src/block/util.ts @@ -35,6 +35,10 @@ export const cancelSB = (protyle: IProtyle, nodeElement: Element) => { id, }); nodeElement.lastElementChild.remove(); + // 超级块中的 html 块需要反转义再赋值 https://github.com/siyuan-note/siyuan/issues/13155 + nodeElement.querySelectorAll("protyle-html").forEach(item => { + item.setAttribute("data-content" , item.getAttribute("data-content").replace(/</g, "<").replace(/>/g, ">")) + }) nodeElement.outerHTML = nodeElement.innerHTML; return; }