From 9510b8fda60e790558bba390407d928db890b1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Rudowicz?= Date: Sun, 27 Dec 2020 19:41:32 +0100 Subject: [PATCH] Fixed https://todo.sr.ht/~michalr/crystal-stuff/2 --- src/main.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cr b/src/main.cr index 8c3cce0..30306db 100644 --- a/src/main.cr +++ b/src/main.cr @@ -5,6 +5,7 @@ require "./templates" require "map_parallel" require "option_parser" require "crustache" +require "html" posts_dir = "." output_dir = nil @@ -84,6 +85,6 @@ end entry_template = Crustache.parse(entry_tpl()) model["entries"].map_parallel do |entry| File.open(Path.new(output_dir_s, entry["url"].as(String)), "w") do |file| - file.puts(Crustache.render(entry_template, entry)) + file.puts(HTML.unescape(Crustache.render(entry_template, entry))) end end -- 2.45.2