From 270ceb7676e867c9dff5f5faa765666b58aaa371 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 20 Mar 2015 10:58:11 +0100 Subject: lib.xml.render-term: quote strings --- lib/xml.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/xml.nix b/lib/xml.nix index 92f552154..16052445b 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; -- cgit v1.2.3