Skip to content

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

:bug: [[ path 没有转义

Vanessabd8254945dde
diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts
index c0da43db69..a1e105f144 100644
--- a/app/src/protyle/hint/extend.ts
+++ b/app/src/protyle/hint/extend.ts
@@ -328,7 +328,7 @@ export const hintRef = (key: string, protyle: IProtyle, isQuick = false): IHintD
<svg class="b3-list-item__graphic popover__block" data-id="${item.id}"><use xlink:href="#${iconName}"></use></svg>
<span class="b3-list-item__text">${item.content}</span>
</div>
-<div class="b3-list-item__meta">${item.hPath}</div>`,
+<div class="b3-list-item__meta">${escapeHtml(item.hPath)}</div>`,
});
});
if (isQuick) {
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts
index 0caabeea0a..2edeeba4f9 100644
--- a/app/src/protyle/hint/index.ts
+++ b/app/src/protyle/hint/index.ts
@@ -310,7 +310,7 @@ ${unicode2Emoji(emoji.unicode, true)}</button>`;
<svg class="b3-list-item__graphic popover__block" data-id="${item.id}"><use xlink:href="#${iconName}"></use></svg>
<span class="b3-list-item__text">${item.content}</span>
</div>
-<div class="b3-list-item__meta">${item.hPath}</div></button>`;
+<div class="b3-list-item__meta">${escapeHtml(item.hPath)}</div></button>`;
});
if (searchHTML === "") {
searchHTML = `<button class="b3-list-item b3-list-item--two fn__block" data-value="">${window.siyuan.languages.emptyContent}</button>`;