mirror of
https://github.com/NixOS/nix.git
synced 2024-11-27 17:22:29 +00:00
Escape `>' signs in the XML output.
* src/libutil/xml-writer.cc (nix::XMLWriter::writeAttrs): Escape `>'.
This commit is contained in:
parent
71be50cc25
commit
eb07a4f1ee
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user