Skip to content

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

:lock: Fix https://github.com/siyuan-note/siyuan/security/advisories/GHSA-7c6g-g2hx-23vv

Daniel0be7e1d4e0da
diff --git a/app/src/emoji/index.ts b/app/src/emoji/index.ts
index 044df7a1fb..cb1ebeffbe 100644
--- a/app/src/emoji/index.ts
+++ b/app/src/emoji/index.ts
@@ -27,8 +27,10 @@ export const unicode2Emoji = (unicode: string, className = "", needSpan = false,
let emoji = "";
if (unicode.startsWith("api/icon/getDynamicIcon")) {
emoji = `<img class="${className}" ${lazy ? "data-" : ""}src="${unicode}"/>`;
+ emoji = Lute.Sanitize(emoji);
} else if (unicode.indexOf(".") > -1) {
emoji = `<img class="${className}" ${lazy ? "data-" : ""}src="/emojis/${unicode}"/>`;
+ emoji = Lute.Sanitize(emoji);
} else {
try {
unicode.split("-").forEach(item => {