- <%= i18n('redirection-hosts', 'delete-confirm', {domains: domain_names.join(', ')}) %>
+ <%= i18n('redirection-hosts', 'delete-confirm', {domains: domain_names.join(', ').toHtmlEntities()}) %>
<% if (certificate_id) { %>
<%- i18n('ssl', 'delete-ssl') %>
diff --git a/frontend/js/app/user/delete.ejs b/frontend/js/app/user/delete.ejs
index 484e278..c10532e 100644
--- a/frontend/js/app/user/delete.ejs
+++ b/frontend/js/app/user/delete.ejs
@@ -7,7 +7,7 @@
diff --git a/frontend/js/index.js b/frontend/js/index.js
index bfaa017..3d817d7 100644
--- a/frontend/js/index.js
+++ b/frontend/js/index.js
@@ -103,6 +103,13 @@ window.tabler = {
}
};
+String.prototype.toHtmlEntities = function() {
+ return this.replace(/./gm, function(s) {
+ // return "" + s.charCodeAt(0) + ";";
+ return (s.match(/[a-z0-9\s]+/i)) ? s : "" + s.charCodeAt(0) + ";";
+ });
+};
+
require('tabler-core');
const App = require('./app/main');
diff --git a/frontend/webpack.config.js b/frontend/webpack.config.js
index 01a09da..05350a4 100644
--- a/frontend/webpack.config.js
+++ b/frontend/webpack.config.js
@@ -92,17 +92,17 @@ module.exports = {
]
},
{
- test: /source-sans-pro.*\.(woff(2)?)(\?v=\d+\.\d+\.\d+)?$/,
- use: [
- {
- loader: 'file-loader',
- options: {
- name: '[name].[ext]',
- outputPath: 'assets/'
- }
- }
- ]
- }
+ test: /source-sans-pro.*\.(woff(2)?)(\?v=\d+\.\d+\.\d+)?$/,
+ use: [
+ {
+ loader: 'file-loader',
+ options: {
+ name: '[name].[ext]',
+ outputPath: 'assets/'
+ }
+ }
+ ]
+ }
]
},
plugins: [