Source

xml_of_ocaml / ASTToXML.ml

Diff from to

File ASTToXML.ml

 
 (* escape XML chars *)
 let escape_string str : string =
+    let str = Str.global_replace (Str.regexp "&") "&" str in
     let str = Str.global_replace (Str.regexp "<") "&lt;" str in
     let str = Str.global_replace (Str.regexp ">") "&gt;" str in
-    let str = Str.global_replace (Str.regexp "&") "&amp;" str in
     let str = Str.global_replace (Str.regexp "'") "&apos;" str in
     let str = Str.global_replace (Str.regexp "\"") "&quot;" str in
     str