about summary refs log tree commit diff
path: root/src/libutil/xml-writer.cc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-03-31T08·29+0000
committerLudovic Courtès <ludo@gnu.org>2010-03-31T08·29+0000
commiteb07a4f1ee532833407b40a9992bfe65c8a4d1d2 (patch)
tree15e5c59a0e35b35979cecebcfa34e223aa61557b /src/libutil/xml-writer.cc
parent71be50cc25544f742db2275b4621b92c4e938400 (diff)
Escape `>' signs in the XML output.
* src/libutil/xml-writer.cc (nix::XMLWriter::writeAttrs): Escape `>'.
Diffstat (limited to 'src/libutil/xml-writer.cc')
-rw-r--r--src/libutil/xml-writer.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libutil/xml-writer.cc b/src/libutil/xml-writer.cc
index 20351e2c30ac..7d698bf6aed5 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 << "&quot;";
             else if (c == '<') output << "&lt;";
+            else if (c == '>') output << "&gt;";
             else if (c == '&') output << "&amp;";
             /* Escape newlines to prevent attribute normalisation (see
                XML spec, section 3.3.3. */