Merge pull request #3074 from actionless/fix-markup-escape
fix(naughty: widget: _markup): correctly un-escape "<span property=value>"
This commit is contained in:
commit
38848bff04
|
@ -9,7 +9,7 @@ local escape_pattern = "[<>&]"
|
||||||
local escape_subs = { ['<'] = "<", ['>'] = ">", ['&'] = "&" }
|
local escape_subs = { ['<'] = "<", ['>'] = ">", ['&'] = "&" }
|
||||||
|
|
||||||
-- Also reverse escaping some allowed tags because people actually use them.
|
-- Also reverse escaping some allowed tags because people actually use them.
|
||||||
local escape_undo = {['<span '] = "<span "}
|
local escape_undo = {["<(span[^&]+)>"] = "<%1>"}
|
||||||
|
|
||||||
for _, allowed in ipairs {'b', 'i', 'u', 'span'} do
|
for _, allowed in ipairs {'b', 'i', 'u', 'span'} do
|
||||||
escape_undo['<' ..allowed..'>'] = "<" ..allowed..">"
|
escape_undo['<' ..allowed..'>'] = "<" ..allowed..">"
|
||||||
|
|
Loading…
Reference in New Issue