summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/xml.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/xml.nix b/lib/xml.nix
index 92f55215..16052445 100644
--- a/lib/xml.nix
+++ b/lib/xml.nix
@@ -68,12 +68,16 @@ rec {
bool = toJSON content;
int = toJSON content;
list = concatMapStrings render content;
- string = content;
+ string = quote content;
};
in
{ name, attrs, content }:
+ # XXX we're currently encoding too much information with `null`..
if name == null
- then ""
+ then
+ if content == null
+ then ""
+ else content
else let
attrs' = render-attrs attrs;
content' = render-content content;