escape ampersand, fix #136

This commit is contained in:
streetturtle 2020-04-30 09:04:52 -04:00
parent 5a8113dfae
commit e9131c266b
1 changed files with 2 additions and 1 deletions

View File

@ -50,11 +50,12 @@ local function worker(args)
end
local update_widget_text = function(widget, stdout, _, _, _)
local escaped = string.gsub(stdout, "&", '&')
if string.find(stdout, 'Error: Spotify is not running.') ~= nil then
widget:set_text('')
widget:set_visible(false)
else
widget:set_text(stdout)
widget:set_text(escaped)
widget:set_visible(true)
end
end