commit 6b88ecf

default  ·  2025-02-09 17:13:01 +0000 UTC
parents 3db7d9f, d9b6b7c
Merge branch 'master' of comam.es:git/snac2
1 files changed,  +2, -2
+2, -2
 1@@ -114,7 +114,7 @@ xs_html *xs_html_text(const char *content)
 2     xs_html *a = XS_HTML_NEW();
 3 
 4     a->type    = XS_HTML_TEXT;
 5-    a->content = xs_html_encode(content);
 6+    a->content = xs_is_string(content) ? xs_html_encode(content) : xs_str_new(NULL);
 7 
 8     return a;
 9 }
10@@ -126,7 +126,7 @@ xs_html *xs_html_raw(const char *content)
11     xs_html *a = XS_HTML_NEW();
12 
13     a->type    = XS_HTML_TEXT;
14-    a->content = xs_dup(content);
15+    a->content = xs_is_string(content) ? xs_dup(content) : xs_str_new(NULL);
16 
17     return a;
18 }