Skip to content

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

:art: escape

Vanessabea48def15e0
diff --git a/app/src/history/doc.ts b/app/src/history/doc.ts
index b571e1996e..85457e4edb 100644
--- a/app/src/history/doc.ts
+++ b/app/src/history/doc.ts
@@ -8,6 +8,7 @@ import {fetchPost} from "../util/fetch";
import {isMobile} from "../util/functions";
import {App} from "../index";
import {resizeSide} from "./resizeSide";
+import {escapeHtml} from "../util/escape";
let historyEditor: Protyle;
let isLoading = false;
@@ -145,7 +146,7 @@ export const openDocHistory = (options: {
getHistoryPath(target.parentElement, opElement.value, options.id, (item) => {
const dataPath = item.path;
isLoading = false;
- const confirmTip = window.siyuan.languages.rollbackConfirm.replace("${name}", item.title)
+ const confirmTip = window.siyuan.languages.rollbackConfirm.replace("${name}", escapeHtml(item.title))
.replace("${time}", target.previousElementSibling.previousElementSibling.textContent.trim());
confirmDialog("⚠️ " + window.siyuan.languages.rollback, confirmTip, () => {
fetchPost("/api/history/rollbackDocHistory", {