Details
-
Type:
Defect
-
Status:
Closed
-
Resolution: Declined
-
Affects Version/s: None
-
Fix Version/s: Backlog
-
Component/s: None
-
Labels:None
-
Approval:Not Approved
Description
(with-out-str
(clojure.xml/emit-element {:tag :e :attrs nil :content "&"}))
</code></pre>
produces: <e>&</e>
correct would be: <e>&</e>
This is true for both element content and attribute content. < and > are not escaped as well. Furthermore, apostrophe ( ' ) in an attribute value leads to broken xml:
<pre><code>
<e a='''/>
Converted from http://www.assembla.com/spaces/clojure/tickets/408
Attachments:
408-escape-and-in-content-and-attribute-value.patch - https://www.assembla.com/spaces/clojure/documents/aBCHT2LZer34ioeJe5cbLr/download/aBCHT2LZer34ioeJe5cbLr