diff --git a/src/public/javascripts/dialogs/confirm.js b/src/public/javascripts/dialogs/confirm.js
index efbc686df..006c9bdc8 100644
--- a/src/public/javascripts/dialogs/confirm.js
+++ b/src/public/javascripts/dialogs/confirm.js
@@ -16,7 +16,11 @@ function confirm(message) {
glob.activeDialog = $dialog;
- $confirmContent.text(message);
+ if (typeof message === 'string') {
+ message = $("
").text(message);
+ }
+
+ $confirmContent.empty().append(message);
$dialog.modal();
diff --git a/src/public/javascripts/services/branches.js b/src/public/javascripts/services/branches.js
index b9539d488..0314724a0 100644
--- a/src/public/javascripts/services/branches.js
+++ b/src/public/javascripts/services/branches.js
@@ -87,8 +87,8 @@ async function deleteNodes(nodes) {
return false;
}
- const nodeTitles = nodes.map((node) => node.title);
- const confirmText = 'This will delete the following notes and their sub-notes: ' + nodeTitles.join(', ');
+ const nodeTitles = $("
").append(...nodes.map(node => $("- ").text(node.title)));
+ const confirmText = $("
").text('This will delete the following notes and their sub-notes: ').append(nodeTitles);
if (!await confirmDialog.confirm(confirmText)) {
return false;
diff --git a/src/views/dialogs/confirm.ejs b/src/views/dialogs/confirm.ejs
index 5b02484e8..e9799c5e1 100644
--- a/src/views/dialogs/confirm.ejs
+++ b/src/views/dialogs/confirm.ejs
@@ -1,5 +1,5 @@