aboutsummaryrefslogtreecommitdiff
path: root/src/clojure/contrib/lazy_xml.clj
diff options
context:
space:
mode:
authorChouser <chouser@n01se.net>2009-02-19 04:14:48 +0000
committerChouser <chouser@n01se.net>2009-02-19 04:14:48 +0000
commiteb4a7db1b6558faf84108cba0cfd8bae8af3c0ba (patch)
treed90a514f81232d381fbdeb994d21df3dc57ccb2c /src/clojure/contrib/lazy_xml.clj
parentb941b53fff69b0b1f7f4a3bfcf5528ec98b60a67 (diff)
lazy-xml: Add escaping of apos
Diffstat (limited to 'src/clojure/contrib/lazy_xml.clj')
-rw-r--r--src/clojure/contrib/lazy_xml.clj2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clojure/contrib/lazy_xml.clj b/src/clojure/contrib/lazy_xml.clj
index 6abc212e..f8b07fe0 100644
--- a/src/clojure/contrib/lazy_xml.clj
+++ b/src/clojure/contrib/lazy_xml.clj
@@ -122,7 +122,7 @@
([s startparse queue-size]
(first (mktree (parse-seq s startparse queue-size)))))
-(def escape-xml-map {\< "&lt;" \> "&gt;" \" "&quot;" \& "&amp;"})
+(def escape-xml-map (zipmap "'<>\"&" (map #(str \& % \;) '[apos lt gt quot amp])))
(defn escape-xml [text]
(apply str (map #(escape-xml-map % %) text)))