From 2f3516812e6df857ae658c8be840d486c071bfa4 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 22 Apr 2019 10:15:22 +0200 Subject: [PATCH] image: allow whitespaces in url --- CHANGELOG.md | 1 + src/client/app/widgets/plots/image.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a1da24a..942da93b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - bug fixes - image: `cache` option inverted + - image: allow whitespaces in url ## 0.45.6 diff --git a/src/client/app/widgets/plots/image.js b/src/client/app/widgets/plots/image.js index a8a373c4..5667c3d0 100644 --- a/src/client/app/widgets/plots/image.js +++ b/src/client/app/widgets/plots/image.js @@ -79,7 +79,7 @@ module.exports = class Image extends Widget { if (!parser.protocol.match(/http|data/)) url = url.replace(':', '_:_') url = url.replace(/\\/g, '\\\\') - this.widget.style.setProperty('background-image', `url(${url}${cache_query})`) + this.widget.style.setProperty('background-image', `url("${url}${cache_query}")`) if (options.sync) this.changed(options)