From eb07a4f1ee532833407b40a9992bfe65c8a4d1d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 31 Mar 2010 08:29:01 +0000 Subject: [PATCH] Escape `>' signs in the XML output. * src/libutil/xml-writer.cc (nix::XMLWriter::writeAttrs): Escape `>'. --- src/libutil/xml-writer.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libutil/xml-writer.cc b/src/libutil/xml-writer.cc index 20351e2c3..7d698bf6a 100644 --- a/src/libutil/xml-writer.cc +++ b/src/libutil/xml-writer.cc @@ -91,6 +91,7 @@ void XMLWriter::writeAttrs(const XMLAttrs & attrs) char c = i->second[j]; if (c == '"') output << """; else if (c == '<') output << "<"; + else if (c == '>') output << ">"; else if (c == '&') output << "&"; /* Escape newlines to prevent attribute normalisation (see XML spec, section 3.3.3. */