From 5ba881ba41ccfa7c2c5fa97c282f715147d70dd1 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 17 Jul 2018 15:02:46 +0200 Subject: 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(-) (limited to 'apps/comments/js') diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js index db38d055af4..8b20bac571b 100644 --- a/apps/comments/js/commentstabview.js +++ b/apps/comments/js/commentstabview.js @@ -195,22 +195,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) { -- cgit v1.2.3