From 94529553ac724a11b6821dd1374c98b0f51b4f14 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 8 Mar 2016 23:22:03 -0500 Subject: initial page rendering --- src/guff/post.cr | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/guff/post.cr') 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 -- cgit v1.2.3