diff options
author | tv <tv@krebsco.de> | 2015-03-20 10:58:11 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-02-16 17:29:09 +0100 |
commit | 270ceb7676e867c9dff5f5faa765666b58aaa371 (patch) | |
tree | d4cd0d5fa15ee599e9c02b23784936bc099cd25e /lib/xml.nix | |
parent | 763a81ac08da6d20b0ea3bbd8423df3e64f934dc (diff) |
lib.xml.render-term: quote strings
Diffstat (limited to 'lib/xml.nix')
-rw-r--r-- | lib/xml.nix | 8 |
1 files 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; |