Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: https://github.com/siyuan-note/siyuan/issues/13155

Vanessa88de8806086f
diff --git a/app/src/block/util.ts b/app/src/block/util.ts
index 272c2422d4..dac72c1dda 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(/&lt;/g, "<").replace(/&gt;/g, ">"))
+ })
nodeElement.outerHTML = nodeElement.innerHTML;
return;
}