Skip to content

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

:art: Prompt for recovery method and retention days settings when deleting documents https://github.com/siyuan-note/siyuan/issues/11400

Daniel67a4613d3180
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json
index f1629930ad..b1362c1d66 100644
--- a/app/appearance/langs/en_US.json
+++ b/app/appearance/langs/en_US.json
@@ -1,5 +1,5 @@
{
- "andSubFile": "Are you sure you want to delete <b>${x}</b> and its <i>${y}</i> subdocs?",
+ "andSubFile": "Are you sure you want to delete <b>${x}</b> and its ${y} subdocs?",
"confirmDeleteTip": "Are you sure to delete <b>${x}</b>?",
"rollbackTip": "After deletion, it can be restored in [Data History], retained <code class= 'fn__code'>${x}</code> days according to [Settings - Editor - History Retention Days]",
"newView": "Add View",
diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json
index 471665dd7c..5d044589f2 100644
--- a/app/appearance/langs/es_ES.json
+++ b/app/appearance/langs/es_ES.json
@@ -1,5 +1,5 @@
{
- "andSubFile": "¿Está seguro de que desea eliminar <b>${x}</b> y sus subdocumentos <i>${y}</i>?",
+ "andSubFile": "¿Está seguro de que desea eliminar <b>${x}</b> y sus subdocumentos ${y}?",
"confirmDeleteTip": "¿Está seguro de eliminar <b>${x}</b>?",
"rollbackTip": "Después de la eliminación, se puede restaurar en [Historial de datos] y se conserva <code class= 'fn__code'>${x}</code> días según [Configuración - Editor - Días de retención del historial]",
"newView": "Agregar vista",
diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json
index b3a7df7f7d..57d104e0a8 100644
--- a/app/appearance/langs/fr_FR.json
+++ b/app/appearance/langs/fr_FR.json
@@ -1,5 +1,5 @@
{
- "andSubFile": "Êtes-vous sûr de vouloir supprimer <b>${x}</b> et ses sous-documents <i>${y}</i> ?",
+ "andSubFile": "Êtes-vous sûr de vouloir supprimer <b>${x}</b> et ses sous-documents ${y} ?",
"confirmDeleteTip": "Êtes-vous sûr de supprimer <b>${x}</b> ?",
"rollbackTip": "Après la suppression, il peut être restauré dans [Historique des données], conservé <code class= 'fn__code'>${x}</code> jours selon [Paramètres - Éditeur - Jours de rétention de l'historique]",
"newView": "Ajouter une vue",
diff --git a/app/appearance/langs/ja_JP.json b/app/appearance/langs/ja_JP.json
index 4ddb94c31d..56b0d1f7de 100644
--- a/app/appearance/langs/ja_JP.json
+++ b/app/appearance/langs/ja_JP.json
@@ -1,5 +1,5 @@
{
- "andSubFile": "<b>${x}</b> とそのサブドキュメント <i>${y}</i> を削除してもよろしいですか?",
+ "andSubFile": "<b>${x}</b> とそのサブドキュメント ${y} を削除してもよろしいですか?",
"confirmDeleteTip": "<b>${x}</b> を削除してもよろしいですか?",
"rollbackTip": "削除後は [データ履歴] で復元でき、<code class= 'fn__code'>${x}</code> は保持されます。 [設定 - エディター - 履歴の保存日数] による日数",
"newView": "ビューを追加",
diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json
index 61f0184cd2..baf565af41 100644
--- a/app/appearance/langs/zh_CHT.json
+++ b/app/appearance/langs/zh_CHT.json
@@ -1,5 +1,5 @@
{
- "andSubFile": "決定刪除 <b>${x}</b> 及其 <i>${y}</i> 個子文件嗎?",
+ "andSubFile": "決定刪除 <b>${x}</b> 及其 ${y} 個子文件嗎?",
"confirmDeleteTip": "確定刪除<b>${x}</b> 嗎?",
"rollbackTip": "刪除後可在 [資料歷史] 中恢復,按 [設定 - 編輯器 - 歷史保留天數] 保留 <code class= 'fn__code'>${x}</code> 天",
"newView": "新增視圖",
diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json
index 294e500de6..3e3c5460a6 100644
--- a/app/appearance/langs/zh_CN.json
+++ b/app/appearance/langs/zh_CN.json
@@ -1,5 +1,5 @@
{
- "andSubFile": "确定删除 <b>${x}</b> 及其 <i>${y}</i> 个子文档吗?",
+ "andSubFile": "确定删除 <b>${x}</b> 及其 ${y} 个子文档吗?",
"confirmDeleteTip": "确定删除 <b>${x}</b> 吗?",
"rollbackTip": "删除后可在 [数据历史] 中恢复,按 [设置 - 编辑器 - 历史保留天数] 保留 <code class='fn__code'>${x}</code> 天",
"newView": "添加视图",
diff --git a/kernel/search/mark.go b/kernel/search/mark.go
index d8fecb2257..f40196a2a8 100644
--- a/kernel/search/mark.go
+++ b/kernel/search/mark.go
@@ -114,7 +114,7 @@ func EncloseHighlighting(text string, keywords []string, openMark, closeMark str
ret = text
if reg, err := regexp.Compile(re); nil == err {
- ret = reg.ReplaceAllStringFunc(text, func(s string) string { return openMark + s + closeMark })
+ ret = reg.ReplaceAllStringFunc(text, func(s string) string { return openMark + util.EscapeHTML(s) + closeMark })
}
// 搜索结果预览包含转义符问题 Search results preview contains escape character issue https://github.com/siyuan-note/siyuan/issues/9790