Changed xml escaping to use commons.lang.StringEscapeUtils.escapeXml()
This commit is contained in:
parent
79f0d3a99a
commit
5721558391
1 changed files with 3 additions and 2 deletions
|
@ -13,7 +13,8 @@
|
|||
(:import (java.io File FileOutputStream PrintWriter)
|
||||
(java.util.regex Pattern)
|
||||
(java.util.zip ZipFile ZipOutputStream ZipEntry)
|
||||
(org.apache.commons.io.output CloseShieldOutputStream)))
|
||||
(org.apache.commons.io.output CloseShieldOutputStream)
|
||||
(org.apache.commons.lang StringEscapeUtils)))
|
||||
|
||||
(defn- tree-edit
|
||||
"Walk the componment xml dom looking for description tag"
|
||||
|
@ -31,7 +32,7 @@
|
|||
[node]
|
||||
(let [content (get (:content node) 0)]
|
||||
(if-not (nil? content)
|
||||
(assoc-in node [:content 0] (clojure.string/escape content {\< "<" \> ">" \& "&" \" """}))
|
||||
(assoc-in node [:content 0] (StringEscapeUtils/escapeXml content))
|
||||
node)))
|
||||
|
||||
(defn- components-read [ins]
|
||||
|
|
Loading…
Reference in a new issue