summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-09-02 09:36:52 +0200
committerAndras Timar <andras.timar@collabora.com>2020-09-02 10:25:15 +0200
commit68f844bad43cefccd70833078354822df5bf2044 (patch)
treed57bcb84f5428d156de6c26f557c568c7e2acc0d
parentloleaflet: no scroll if editing a cell formula (diff)
downloadonline-68f844bad43cefccd70833078354822df5bf2044.tar.gz
online-68f844bad43cefccd70833078354822df5bf2044.zip
Fix name formatting
Change-Id: I2aed56cf362c0e68918955340d35013179a54ad1 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101868 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--loleaflet/src/control/Control.UserList.js5
-rw-r--r--loleaflet/src/layer/marker/Cursor.js2
2 files changed, 4 insertions, 3 deletions
diff --git a/loleaflet/src/control/Control.UserList.js b/loleaflet/src/control/Control.UserList.js
index 47a259ecab..ed902a7c7a 100644
--- a/loleaflet/src/control/Control.UserList.js
+++ b/loleaflet/src/control/Control.UserList.js
@@ -96,7 +96,7 @@ L.Control.UserList = L.Control.extend({
$(img).css({'background-color': color});
}
- nameTd.innerHTML = userName;
+ nameTd.textContent = userName;
return content;
},
@@ -211,10 +211,11 @@ L.Control.UserList = L.Control.extend({
onRemoveView: function(e) {
var that = this;
+ var username = this.escapeHtml(e.username);
$('#tb_actionbar_item_userlist')
.w2overlay({
class: 'loleaflet-font',
- html: this.options.userLeftPopupMessage.replace('%user', e.username),
+ html: this.options.userLeftPopupMessage.replace('%user', username),
style: 'padding: 5px'
});
clearTimeout(this.options.userPopupTimeout);
diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js
index 4e415b6208..348356fc11 100644
--- a/loleaflet/src/layer/marker/Cursor.js
+++ b/loleaflet/src/layer/marker/Cursor.js
@@ -93,7 +93,7 @@ L.Cursor = L.Layer.extend({
if (this.options.header) {
this._cursorHeader = L.DomUtil.create('div', 'leaflet-cursor-header', this._container);
- this._cursorHeader.innerHTML = this.options.headerName;
+ this._cursorHeader.textContent = this.options.headerName;
clearTimeout(this._blinkTimeout);
this._blinkTimeout = setTimeout(L.bind(function() {