mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-04 09:49:07 +08:00
🎨 escape
This commit is contained in:
parent
1474360c2a
commit
bea48def15
@ -8,6 +8,7 @@ import {fetchPost} from "../util/fetch";
|
|||||||
import {isMobile} from "../util/functions";
|
import {isMobile} from "../util/functions";
|
||||||
import {App} from "../index";
|
import {App} from "../index";
|
||||||
import {resizeSide} from "./resizeSide";
|
import {resizeSide} from "./resizeSide";
|
||||||
|
import {escapeHtml} from "../util/escape";
|
||||||
|
|
||||||
let historyEditor: Protyle;
|
let historyEditor: Protyle;
|
||||||
let isLoading = false;
|
let isLoading = false;
|
||||||
@ -145,7 +146,7 @@ export const openDocHistory = (options: {
|
|||||||
getHistoryPath(target.parentElement, opElement.value, options.id, (item) => {
|
getHistoryPath(target.parentElement, opElement.value, options.id, (item) => {
|
||||||
const dataPath = item.path;
|
const dataPath = item.path;
|
||||||
isLoading = false;
|
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());
|
.replace("${time}", target.previousElementSibling.previousElementSibling.textContent.trim());
|
||||||
confirmDialog("⚠️ " + window.siyuan.languages.rollback, confirmTip, () => {
|
confirmDialog("⚠️ " + window.siyuan.languages.rollback, confirmTip, () => {
|
||||||
fetchPost("/api/history/rollbackDocHistory", {
|
fetchPost("/api/history/rollbackDocHistory", {
|
||||||
|
Loading…
Reference in New Issue
Block a user