diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-03-31T08·29+0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-03-31T08·29+0000 |
commit | eb07a4f1ee532833407b40a9992bfe65c8a4d1d2 (patch) | |
tree | 15e5c59a0e35b35979cecebcfa34e223aa61557b | |
parent | 71be50cc25544f742db2275b4621b92c4e938400 (diff) |
Escape `>' signs in the XML output.
* src/libutil/xml-writer.cc (nix::XMLWriter::writeAttrs): Escape `>'.
-rw-r--r-- | src/libutil/xml-writer.cc | 1 |
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 << """; 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. */ |