diff --git a/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js b/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js
index 8e7e6c5792..18aa471950 100755
--- a/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js
+++ b/admin-ui/src/main/resources/META-INF/resources/admin/js/services.js
@@ -15,9 +15,16 @@ module.service('Auth', function() {
module.service('Dialog', function($dialog) {
var dialog = {};
+
+ var escapeHtml = function(str) {
+ var div = document.createElement('div');
+ div.appendChild(document.createTextNode(str));
+ return div.innerHTML;
+ };
+
dialog.confirmDelete = function(name, type, success) {
- var title = 'Delete ' + type.charAt(0).toUpperCase() + type.slice(1);
- var msg = 'Are you sure you want to permanently delete the ' + type + ' "' + name + '"?' +
+ var title = 'Delete ' + escapeHtml(type.charAt(0).toUpperCase() + type.slice(1));
+ var msg = 'Are you sure you want to permanently delete the ' + escapeHtml(type) + ' "' + escapeHtml(name) + '"?' +
'This action can\'t be undone.';
var btns = [ {
result : 'cancel',