summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-03-31 08:29:01 +0000
committerLudovic Courtès <ludo@gnu.org>2010-03-31 08:29:01 +0000
commiteb07a4f1ee532833407b40a9992bfe65c8a4d1d2 (patch)
tree15e5c59a0e35b35979cecebcfa34e223aa61557b /src/libutil
parent71be50cc25544f742db2275b4621b92c4e938400 (diff)
downloadguix-eb07a4f1ee532833407b40a9992bfe65c8a4d1d2.tar.gz
Escape `>' signs in the XML output.
* src/libutil/xml-writer.cc (nix::XMLWriter::writeAttrs): Escape `>'.
Diffstat (limited to 'src/libutil')
-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 20351e2c30..7d698bf6ae 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. */