Fork me on GitHub
#clojure-uk
<
2017-05-27
>
glenjamin19:05:37

I always quite liked hiccup… until I realised it doesn’t autoescape strings

glenjamin19:05:13

is that a thing?

dominicm19:05:27

I mean, it's alpha, but it fixes that

glenjamin19:05:40

I did ask James about it once a few years ago, but he said it was tricky because strings were used as intermediate forms

glenjamin19:05:53

and perf would be hard if it had to stay as data until render for every fragment

dominicm19:05:18

no idea. seems to be implemented though. ¯\(ツ)

weavejester20:05:10

Hiccup 2 uses a custom type as an intermediate form to get around the problem. But that does mean that the API is a little different; (str (html [:span "foo"])) instead of just (html [:span "foo"]).

weavejester20:05:36

To maintain backward compatibility, the 2.0 alpha puts the new stuff in hiccup2.core.