fix: Database isn't escaped when dumped in the published HTML file

Related to #1100
This commit is contained in:
Tienson Qin
2021-01-15 19:14:06 +08:00
parent 58d7b1d0bf
commit 2192a4945e
5 changed files with 31 additions and 19 deletions

View File

@@ -30,15 +30,3 @@
;; Example 2:
;; <div style="padding: 20px; opacity: 0;height: 20px;" onmouseout="alert('Gotcha!')"></div>
;; Copy from hiccup
;; (defn escape-html
;; "Change special characters into HTML character entities."
;; [text]
;; (-> text
;; (string/replace "&" "&amp;")
;; (string/replace "<" "&lt;")
;; (string/replace ">" "&gt;")
;; (string/replace "\"" "&quot;")
;; (string/replace "'" "&apos;")
;; (string/replace #"(?i)javascript:" "")))