diff options
author | Chouser <chouser@n01se.net> | 2009-02-19 04:14:48 +0000 |
---|---|---|
committer | Chouser <chouser@n01se.net> | 2009-02-19 04:14:48 +0000 |
commit | eb4a7db1b6558faf84108cba0cfd8bae8af3c0ba (patch) | |
tree | d90a514f81232d381fbdeb994d21df3dc57ccb2c /src/clojure/contrib/lazy_xml.clj | |
parent | b941b53fff69b0b1f7f4a3bfcf5528ec98b60a67 (diff) |
lazy-xml: Add escaping of apos
Diffstat (limited to 'src/clojure/contrib/lazy_xml.clj')
-rw-r--r-- | src/clojure/contrib/lazy_xml.clj | 2 |
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 {\< "<" \> ">" \" """ \& "&"}) +(def escape-xml-map (zipmap "'<>\"&" (map #(str \& % \;) '[apos lt gt quot amp]))) (defn escape-xml [text] (apply str (map #(escape-xml-map % %) text))) |