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

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 16 10:45:59 UTC 2020


 loleaflet/src/layer/tile/TileLayer.js |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e25379af2295f2e4356e8a12a28d66a28f2446a5
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Sep 16 10:57:05 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Sep 16 12:45:40 2020 +0200

    Encode wopisrc part in download link
    
    Avoid browser warnings/errors wrt encoding when
    trying to download.
    
    Change-Id: I66820c1adec1a612f773b41416bc623c42cdb138
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102843
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index bdd3f3486..cd7fe7e83 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -923,7 +923,7 @@ L.TileLayer = L.GridLayer.extend({
 
 		var wopiSrc = '';
 		if (this._map.options.wopiSrc != '') {
-			wopiSrc = '?WOPISrc=' + this._map.options.wopiSrc;
+			wopiSrc = '?WOPISrc=' + encodeURIComponent(this._map.options.wopiSrc);
 		}
 		var url = this._map.options.webserver + this._map.options.serviceRoot + '/' + this._map.options.urlPrefix + '/' +
 			encodeURIComponent(this._map.options.doc) + '/download/' + command.downloadid + wopiSrc;


More information about the Libreoffice-commits mailing list