]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

task: proper XML escaping in notification
authorRoland Hieber <rohieb@rohieb.name>
Fri, 22 Jul 2016 04:51:30 +0000 (06:51 +0200)
committerRoland Hieber <rohieb@rohieb.name>
Fri, 22 Jul 2016 04:51:34 +0000 (06:51 +0200)
widgets/contrib/task.lua

index f721548fabe0870c9b76a3ff12645836d7776c8f..98817f9fcabc8f511a0c0ee14b5261bfaa8d31c0 100644 (file)
@@ -52,7 +52,7 @@ function task:show(scr_pos)
     c_text = "<span font='"
              .. task.font .. " "
              .. task.font_size .. "'>"
     c_text = "<span font='"
              .. task.font .. " "
              .. task.font_size .. "'>"
-             .. f:read("*all"):gsub("\n*$", "")
+             .. awful.util.escape(f:read("*all"):gsub("\n*$", ""))
              .. "</span>"
     f:close()
 
              .. "</span>"
     f:close()
 
@@ -75,7 +75,7 @@ function task:prompt_add()
           c_text = "\n<span font='"
                    .. task.font .. " "
                    .. task.font_size .. "'>"
           c_text = "\n<span font='"
                    .. task.font .. " "
                    .. task.font_size .. "'>"
-                   .. f:read("*all")
+                   .. awful.util.escape(f:read("*all"))
                    .. "</span>"
           f:close()
 
                    .. "</span>"
           f:close()
 
@@ -107,7 +107,7 @@ function task:prompt_search()
               c_text = "<span font='"
                        .. task.font .. " "
                        .. task.font_size .. "'>"
               c_text = "<span font='"
                        .. task.font .. " "
                        .. task.font_size .. "'>"
-                       .. c_text
+                       .. awful.util.escape(c_text)
                        .. "</span>"
           end
 
                        .. "</span>"
           end