diff options
Diffstat (limited to 'src/guff/post.cr')
-rw-r--r-- | src/guff/post.cr | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/guff/post.cr b/src/guff/post.cr index 735682c..703ed55 100644 --- a/src/guff/post.cr +++ b/src/guff/post.cr @@ -1,3 +1,6 @@ +require "html" +require "ecr/macros" + class Guff::Post def initialize(@row : Hash(String, ::SQLite3::Value)) end @@ -18,4 +21,11 @@ class Guff::Post [] of String end end + + private def h(s) : String + HTML.escape(s) + end + + # FIXME: does this belong elsewhere? + ECR.def_to_s("./src/guff/views/ecrs/post.ecr") end |