Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/7439

Vanessafea957731b76
diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts
index a42d3789fb..77c251895a 100644
--- a/app/src/protyle/wysiwyg/keydown.ts
+++ b/app/src/protyle/wysiwyg/keydown.ts
@@ -970,7 +970,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
}
const actionElementId = actionElement.getAttribute("data-node-id");
if (selectText !== "") {
- writeText(`((${actionElementId} "${selectText}"))`);
+ writeText(`((${actionElementId} "${Lute.EscapeHTMLStr(selectText)}"))`);
} else {
fetchPost("/api/block/getRefText", {id: actionElementId}, (response) => {
writeText(`((${actionElementId} '${response.data}'))`);