summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spotify-widget/spotify.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/spotify-widget/spotify.lua b/spotify-widget/spotify.lua
index e826de9..f8b2b62 100644
--- a/spotify-widget/spotify.lua
+++ b/spotify-widget/spotify.lua
@@ -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