From e706bbd36237abc6c63d3e30cdaf9a42ac458215 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Tue, 28 Jul 2015 15:10:35 +0200 Subject: Fixing bug #4281: Better escaping of XML attributes. --- lib/xml_printer.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/xml_printer.ml') diff --git a/lib/xml_printer.ml b/lib/xml_printer.ml index eeddd53cb8..bbb7b51ba3 100644 --- a/lib/xml_printer.ml +++ b/lib/xml_printer.ml @@ -46,6 +46,8 @@ let buffer_attr tmp (n,v) = match v.[p] with | '\\' -> output "\\\\" | '"' -> output "\\\"" + | '<' -> output "<" + | '&' -> output "&" | c -> output' c done; output' '"' -- cgit v1.2.3