From 12e5998698061d77dbd02b63a11732920496ebe1 Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Wed, 8 Feb 2017 01:15:36 +0000 Subject: [PATCH] naughty: urldecode icon URI file file:// URIs should be urlencoded; decode URIs where required. Signed-off-by: Jonathan McCrohan --- lib/naughty/core.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/naughty/core.lua b/lib/naughty/core.lua index 0939afa7..1175daed 100644 --- a/lib/naughty/core.lua +++ b/lib/naughty/core.lua @@ -569,6 +569,8 @@ function naughty.notify(args) -- Is this really an URI instead of a path? if type(icon) == "string" and string.sub(icon, 1, 7) == "file://" then icon = string.sub(icon, 8) + -- urldecode URI path + icon = string.gsub(icon, "%%(%x%x)", function(x) return string.char(tonumber(x, 16)) end ) end -- try to guess icon if the provided one is non-existent/readable if type(icon) == "string" and not util.file_readable(icon) then