image: allow whitespaces in url

This commit is contained in:
jean-emmanuel 2019-04-22 10:15:22 +02:00
parent af34f87ac8
commit dd2f626bc5
2 changed files with 2 additions and 1 deletions

View file

@ -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)