Skip to content

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

:art: 搜索分组转义

Vanessafbe74008934c
diff --git a/app/src/search/util.ts b/app/src/search/util.ts
index f37dfb62a2..57eabc46fe 100644
--- a/app/src/search/util.ts
+++ b/app/src/search/util.ts
@@ -1347,7 +1347,7 @@ const onSearch = (data: IBlock[], edit: Protyle, element: Element) => {
<svg class="b3-list-item__arrow b3-list-item__arrow--open"><use xlink:href="#iconRight"></use></svg>
</span>
${unicode2Emoji(getNotebookIcon(item.box) || Constants.SIYUAN_IMAGE_NOTE, false, "b3-list-item__graphic", true)}
-<span class="b3-list-item__text" title="${title}">${title}</span>
+<span class="b3-list-item__text" title="${escapeAttr(title)}">${escapeGreat(title)}</span>
</div><div>`;
item.children.forEach((childItem, childIndex) => {
resultHTML += `<div style="padding-left: 22px" data-type="search-item" class="b3-list-item${childIndex === 0 && index === 0 ? " b3-list-item--focus" : ""}" data-node-id="${childItem.id}" data-root-id="${childItem.rootID}">