Merge pull request #10913 from nextcloud/do-not-parse-html-in-user-id-and-display-name
Do not parse HTML in user id and display name
This commit is contained in:
commit
ab9672a32f
|
@ -195,22 +195,26 @@
|
||||||
},
|
},
|
||||||
sorter: function (q, items) { return items; }
|
sorter: function (q, items) { return items; }
|
||||||
},
|
},
|
||||||
displayTpl: '<li>'
|
displayTpl: function (item) {
|
||||||
|
return '<li>'
|
||||||
+ '<span class="avatar-name-wrapper">'
|
+ '<span class="avatar-name-wrapper">'
|
||||||
+ '<div class="avatar" '
|
+ '<div class="avatar" '
|
||||||
+ 'data-username="${id}"' // for avatars
|
+ ' data-username="' + escapeHTML(item.id) + '"' // for avatars
|
||||||
+ ' data-user="${id}"' // for contactsmenu
|
+ ' data-user="' + escapeHTML(item.id) + '"' // for contactsmenu
|
||||||
+ ' data-user-display-name="${label}"></div>'
|
+ ' data-user-display-name="' + escapeHTML(item.label) + '"></div>'
|
||||||
+ ' <strong>${label}</strong>'
|
+ ' <strong>' + escapeHTML(item.label) + '</strong>'
|
||||||
+ '</span></li>',
|
+ '</span></li>';
|
||||||
insertTpl: ''
|
},
|
||||||
|
insertTpl: function (item) {
|
||||||
|
return ''
|
||||||
+ '<span class="avatar-name-wrapper">'
|
+ '<span class="avatar-name-wrapper">'
|
||||||
+ '<div class="avatar" '
|
+ '<div class="avatar" '
|
||||||
+ 'data-username="${id}"' // for avatars
|
+ ' data-username="' + escapeHTML(item.id) + '"' // for avatars
|
||||||
+ ' data-user="${id}"' // for contactsmenu
|
+ ' data-user="' + escapeHTML(item.id) + '"' // for contactsmenu
|
||||||
+ ' data-user-display-name="${label}"></div>'
|
+ ' data-user-display-name="' + escapeHTML(item.label) + '"></div>'
|
||||||
+ ' <strong>${label}</strong>'
|
+ ' <strong>' + escapeHTML(item.label) + '</strong>'
|
||||||
+ '</span>',
|
+ '</span>';
|
||||||
|
},
|
||||||
searchKey: "label"
|
searchKey: "label"
|
||||||
});
|
});
|
||||||
$target.on('inserted.atwho', function (je, $el) {
|
$target.on('inserted.atwho', function (je, $el) {
|
||||||
|
|
Loading…
Reference in New Issue