An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: fix https://github.com/siyuan-note/siyuan/issues/5279
Vanessa27ec03d938d3
diff --git a/app/src/assets/scss/_search.scss b/app/src/assets/scss/_search.scssindex 554709697c..9746aa0db3 100644--- a/app/src/assets/scss/_search.scss+++ b/app/src/assets/scss/_search.scss@@ -24,6 +24,7 @@overflow: auto;top: 48px;position: absolute;+ left: 8px;}}diff --git a/app/src/protyle/markdown/highlightRender.ts b/app/src/protyle/markdown/highlightRender.tsindex a957d57f5a..bf70a8a49a 100644--- a/app/src/protyle/markdown/highlightRender.ts+++ b/app/src/protyle/markdown/highlightRender.ts@@ -63,6 +63,7 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =if (!hljs.getLanguage(language)) {language = "plaintext";}+ block.classList.add("hljs");block.innerHTML = hljs.highlight(block.textContent + (block.textContent.endsWith("\n") ? "" : "\n"), // https://github.com/siyuan-note/siyuan/issues/4609{diff --git a/app/src/search/index.ts b/app/src/search/index.tsindex d679877e26..c6c2e2f6a1 100644--- a/app/src/search/index.ts+++ b/app/src/search/index.ts@@ -192,7 +192,7 @@ export class Search extends Model {const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHETABDATA) || "[]");data.forEach((s: string) => {if (s !== inputElement.value) {- html += `<div class="b3-list-item">${s}</div>`;+ html += `<div class="b3-list-item">${escapeHtml(s)}</div>`;}});historyElement.classList.remove("fn__none");diff --git a/app/src/search/spread.ts b/app/src/search/spread.tsindex 8de480d4cd..c40731b44b 100644--- a/app/src/search/spread.ts+++ b/app/src/search/spread.ts@@ -110,7 +110,10 @@ export const openSearch = async (hotkey: string, key?: string, notebookId?: stri<div id="searchHistoryList" data-close="false" class="fn__none b3-menu b3-list b3-list--background"></div></div><div class="b3-form__icon search__header${hotkey === window.siyuan.config.keymap.general.replace.custom ? "" : " fn__none"}">- <svg id="replaceHistoryBtn" data-menu="true" class="b3-form__icon-icon fn__a"><use xlink:href="#iconSearch"></use></svg>+ <span class="fn__a" id="replaceHistoryBtn">+ <svg data-menu="true" class="b3-form__icon-icon"><use xlink:href="#iconSearch"></use></svg>+ <svg class="search__arrowdown"><use xlink:href="#iconDown"></use></svg>+ </span><input id="replaceInput" class="b3-text-field b3-text-field--text fn__block b3-form__icon-input"><svg class="fn__rotate fn__none svg" style="padding: 0 8px;align-self: center;"><use xlink:href="#iconRefresh"></use></svg><button id="replaceAllBtn" class="b3-button b3-button--outline fn__flex-center">${window.siyuan.languages.replaceAll}</button>@@ -325,7 +328,7 @@ export const openSearch = async (hotkey: string, key?: string, notebookId?: strilet html = "";(localData.list || []).forEach((s: string) => {if (s !== searchInputElement.value) {- html += `<div class="b3-list-item">${s}</div>`;+ html += `<div class="b3-list-item">${escapeHtml(s)}</div>`;}});historyElement.classList.remove("fn__none");@@ -343,7 +346,7 @@ export const openSearch = async (hotkey: string, key?: string, notebookId?: strilet html = "";(localData.replaceList || []).forEach((s: string) => {if (s !== replaceInputElement.value) {- html += `<div class="b3-list-item">${s}</div>`;+ html += `<div class="b3-list-item">${escapeHtml(s)}</div>`;}});replaceHistoryElement.classList.remove("fn__none");