aboutsummaryrefslogtreecommitdiff
path: root/src/guff/post.cr
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-03-08 23:22:03 -0500
committerPaul Duncan <pabs@pablotron.org>2016-03-08 23:22:03 -0500
commit94529553ac724a11b6821dd1374c98b0f51b4f14 (patch)
tree61217fd1d344a57a90456e12f62a0358a4863f8b /src/guff/post.cr
parent6d3952936c2408f7525941e677db25fb59d34d9b (diff)
downloadold-guff-94529553ac724a11b6821dd1374c98b0f51b4f14.tar.bz2
old-guff-94529553ac724a11b6821dd1374c98b0f51b4f14.zip
initial page rendering
Diffstat (limited to 'src/guff/post.cr')
-rw-r--r--src/guff/post.cr10
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