diff --git a/contact-center/app/src/main/resources/templates/apps/entim/group/index.pug b/contact-center/app/src/main/resources/templates/apps/entim/group/index.pug
index edfbf318..ce06b6bf 100644
--- a/contact-center/app/src/main/resources/templates/apps/entim/group/index.pug
+++ b/contact-center/app/src/main/resources/templates/apps/entim/group/index.pug
@@ -203,11 +203,24 @@ block content
openchat('/ent/im/chat.html?userid=' + id, '/images/user-pc.png', uname, user.id, '最近登陆:' + lastlogintime)
}
}
+ function escapeHtml (str) {
+ if (typeof str == 'string') {
+ return str.replace(/<|&|>/g, function (matches) {
+ return ({
+ '<': '<',
+ '>': '>',
+ '&': '&'
+ })[matches];
+ });
+ }
+
+ return '';
+ }
function openchat(url, img, name, id, text) {
top.layer.open({
type: 2,
id: id,
- title: ["

" + name + "" + text + "
", "height:55px"],
+ title: ["
" + escapeHtml(name) + "" + text + "
", "height:55px"],
closeBtn: 1, //不显示关闭按钮
shade: false,
area: ['700px', '520px'],
diff --git a/contact-center/app/src/main/resources/templates/apps/entim/index.pug b/contact-center/app/src/main/resources/templates/apps/entim/index.pug
index b1eabfc1..8f1fb469 100644
--- a/contact-center/app/src/main/resources/templates/apps/entim/index.pug
+++ b/contact-center/app/src/main/resources/templates/apps/entim/index.pug
@@ -164,11 +164,24 @@ block content
, shade: 0 //不显示遮罩
});
}
+ function escapeHtml (str) {
+ if (typeof str == 'string') {
+ return str.replace(/<|&|>/g, function (matches) {
+ return ({
+ '<': '<',
+ '>': '>',
+ '&': '&'
+ })[matches];
+ });
+ }
+
+ return '';
+ }
function openchat(url, img, name, id, text) {
top.layer.open({
type: 2,
id: id,
- title: ["
" + name + "" + text + "
", "height:55px"],
+ title: ["
" + escapeHtml(name) + "" + text + "
", "height:55px"],
closeBtn: 1, //不显示关闭按钮
shade: false,
area: ['700px', '520px'],