From ea2b2d9b6292ff1cb0fa5cb924481eb776b90fe4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 25 Mar 2023 11:04:01 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7763 --- app/src/ai/actions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/ai/actions.ts b/app/src/ai/actions.ts index da9184c6a..461a3d64a 100644 --- a/app/src/ai/actions.ts +++ b/app/src/ai/actions.ts @@ -11,7 +11,7 @@ import {highlightRender} from "../protyle/markdown/highlightRender"; import {Constants} from "../constants"; import {setStorageVal} from "../protyle/util/compatibility"; import {hasClosestByClassName} from "../protyle/util/hasClosest"; -import {escapeHtml} from "../util/escape"; +import {escapeAttr, escapeHtml} from "../util/escape"; export const fillContent = (protyle: IProtyle, data: string, elements: Element[]) => { setLastNodeRange(getContenteditableElement(elements[elements.length - 1]), protyle.toolbar.range); @@ -70,7 +70,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => { const dialog = new Dialog({ title: window.siyuan.languages.save, content: `
- +
@@ -103,7 +103,7 @@ export const AIActions = (elements: Element[], protyle: IProtyle) => { customMenu.push({ iconHTML: Constants.ZWSP, action: "iconCloseRound", - label: escapeHtml(item.name), + label: `
${escapeHtml(item.name)}
`, bind: (element) => { element.addEventListener("click", (event) => { if (hasClosestByClassName(event.target as Element, "b3-menu__action")) {