From 9e7197cbccc35c9c763c64cfab651577cddf8be6 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 17 Jul 2018 15:02:46 +0200 Subject: [PATCH] Do not parse HTML in user id and display name Signed-off-by: Joas Schilling --- apps/comments/js/commentstabview.js | 36 ++++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js index 9e501b141a..2d5923773f 100644 --- a/apps/comments/js/commentstabview.js +++ b/apps/comments/js/commentstabview.js @@ -196,22 +196,26 @@ }, sorter: function (q, items) { return items; } }, - displayTpl: '
  • ' - + '' - + '
    ' - + ' ${label}' - + '
  • ', - insertTpl: '' - + '' - + '
    ' - + ' ${label}' - + '
    ', + displayTpl: function (item) { + return '
  • ' + + '' + + '
    ' + + ' ' + escapeHTML(item.label) + '' + + '
  • '; + }, + insertTpl: function (item) { + return '' + + '' + + '
    ' + + ' ' + escapeHTML(item.label) + '' + + '
    '; + }, searchKey: "label" }); $target.on('inserted.atwho', function (je, $el) {