[Libreoffice-commits] online.git: loleaflet/src

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 2 08:02:02 UTC 2020


 loleaflet/src/control/Control.UserList.js |    5 +++--
 loleaflet/src/layer/marker/Cursor.js      |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 9c55d2d5b918c27a30859c152c102f944b2ba612
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Sep 2 09:36:52 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Sep 2 10:01:43 2020 +0200

    Fix name formatting
    
    Change-Id: I2aed56cf362c0e68918955340d35013179a54ad1
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101909
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/control/Control.UserList.js b/loleaflet/src/control/Control.UserList.js
index 47a259eca..ed902a7c7 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 71cd97a00..b9ffb02c4 100644
--- a/loleaflet/src/layer/marker/Cursor.js
+++ b/loleaflet/src/layer/marker/Cursor.js
@@ -96,7 +96,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() {


More information about the Libreoffice-commits mailing list