Skip to content

Commit 90d354a

Browse files
alxdbmalcolmsparks
authored andcommitted
Sanitized html output with hiccup (#294)
1 parent 8c82caa commit 90d354a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/yada/body.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[clojure.tools.logging :refer :all]
99
[hiccup.core :refer [html]]
1010
[hiccup.page :refer [xhtml]]
11+
[hiccup.util :refer [escape-html]]
1112
[manifold.stream :refer [->source transform]]
1213
[yada.charset :as charset]
1314
[yada.status :refer [status]]
@@ -249,7 +250,7 @@
249250
(.printStackTrace error pw)
250251
(.flush pw)
251252
(let [s (String. (.toByteArray baos))]
252-
[:pre s])))])
253+
[:pre (escape-html s)])))])
253254

254255
[:div
255256
[:p.footer

0 commit comments

Comments
 (0)