diff --git a/public/js/pages/notifications.js b/public/js/pages/notifications.js
index faaf6e4..5a803a2 100644
--- a/public/js/pages/notifications.js
+++ b/public/js/pages/notifications.js
@@ -17,7 +17,7 @@ const NotificationsPage = {
${c.webhook_url?`
地址${U.esc(c.webhook_url)}
`:''}
事件${EventsLabel(c.events)}
-
+
diff --git a/public/js/pages/templates.js b/public/js/pages/templates.js
index 7cc9110..b81f449 100644
--- a/public/js/pages/templates.js
+++ b/public/js/pages/templates.js
@@ -15,7 +15,7 @@ const TemplatesPage = {
${U.esc(t.name)}${t.code}
主题${U.esc(t.subject)}
${t.description ? `
说明${U.esc(t.description)}
` : ''}
-
+
`).join('');
} catch (e) { ct.innerHTML = `${e.message}
`; }
diff --git a/public/js/pages/users.js b/public/js/pages/users.js
index cf9cc51..a7f8da0 100644
--- a/public/js/pages/users.js
+++ b/public/js/pages/users.js
@@ -21,7 +21,7 @@ const UsersPage = {
${U.badge(u.role,'role')} |
${u.active ? '启用' : '禁用'} |
${U.date(u.created_at)} |
- |
+ |
`).join('')}
`;
} catch (e) { ct.innerHTML = `${e.message}
`; }
diff --git a/public/js/utils.js b/public/js/utils.js
index ec7c6b3..c03f18c 100644
--- a/public/js/utils.js
+++ b/public/js/utils.js
@@ -25,6 +25,11 @@ const U = {
return String(s).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,''');
},
+ escJs(s) {
+ if (!s) return '';
+ return String(s).replace(/\\/g,'\\\\').replace(/'/g,"\\'").replace(/\n/g,'\\n');
+ },
+
showAlert(containerId, type, msg) {
const ct = document.getElementById(containerId || 'page-content');
const el = document.createElement('div');