Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/17002

Vanessafb8d9dfde9cc
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index d34d92d698..783f6fe2df 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -2267,7 +2267,7 @@ export const tableMenu = (protyle: IProtyle, nodeElement: Element, cellElement:
} else {
nodeElement.querySelector("table").insertAdjacentHTML("afterbegin", html);
}
- nodeElement.setAttribute("caption", html);
+ nodeElement.setAttribute("caption", Lute.EscapeHTMLStr(`<caption${location === "bottom" ? "caption-side: bottom;" : ""}>${title}</caption>`));
} else {
if (captionElement) {
captionElement.remove();