[awful] Fix a bug in escape(), add unescape
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
35e83ddfa6
commit
f0131d985d
11
awful.lua
11
awful.lua
|
@ -469,11 +469,20 @@ local function escape(text)
|
|||
text = text:gsub("&", "&")
|
||||
text = text:gsub("<", "<")
|
||||
text = text:gsub(">", ">")
|
||||
text = text:gsub("\\", "'")
|
||||
text = text:gsub("'", "'")
|
||||
text = text:gsub("\"", """)
|
||||
return text
|
||||
end
|
||||
|
||||
local function unescape(text)
|
||||
text = text:gsub("&", "&")
|
||||
text = text:gsub("<", "<")
|
||||
text = text:gsub(">", ">")
|
||||
text = text:gsub("'", "'")
|
||||
text = text:gsub(""", "\"")
|
||||
return text
|
||||
end
|
||||
|
||||
-- Export tags function
|
||||
P.tag =
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue