From 6e5c34ebdd6508e55c39719c4c7f222fd426ce96 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 29 Jan 2017 09:52:05 -0500 Subject: [PATCH] escape more in code tags --- contrib/lua/memeposting.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/lua/memeposting.lua b/contrib/lua/memeposting.lua index 5a1d879..ec91ee0 100644 --- a/contrib/lua/memeposting.lua +++ b/contrib/lua/memeposting.lua @@ -18,6 +18,12 @@ function psy_text(str) end function pre_text(str) + + str = str:gsub("%(", "(") + str = str:gsub("%)", ")") + str = str:gsub("%[", "[") + str = str:gsub("\\", "\") + str = str:gsub("%]", "]") return span_text("code", str:gsub("%|", "|")) end