From e11a7069a497605097c6a7390d23dd0cedceebe9 Mon Sep 17 00:00:00 2001 From: lxsang Date: Thu, 18 Jun 2020 00:32:16 +0200 Subject: [PATCH] add unescape --- blog/controllers/PostController.lua | 2 +- blog/views/default/post/posts.ls | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/blog/controllers/PostController.lua b/blog/controllers/PostController.lua index a9b5b39..3cf7206 100644 --- a/blog/controllers/PostController.lua +++ b/blog/controllers/PostController.lua @@ -94,7 +94,7 @@ function PostController:id(pid) return self:notfound("No post found") end data = data[1] - data.rendered = data.rendered:gsub("%%", "%%%%") + data.rendered = utils.unescape(data.rendered):gsub("%%", "%%%%") local a, b = data.rendered:find("<[Hh]1[^>]*>") if a then local c, d = data.rendered:find("") diff --git a/blog/views/default/post/posts.ls b/blog/views/default/post/posts.ls index c63ed86..efeff7e 100644 --- a/blog/views/default/post/posts.ls +++ b/blog/views/default/post/posts.ls @@ -39,7 +39,7 @@
)") local title = nil if r then