From e9131c266bf2ffedfa0e272afd1b365863374a55 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Thu, 30 Apr 2020 09:04:52 -0400 Subject: escape ampersand, fix #136 --- spotify-widget/spotify.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spotify-widget') 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 -- cgit v1.2.3