diff options
| author | default <nobody@localhost> | 2025-02-09 07:18:17 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-02-09 07:18:17 +0100 |
| commit | d9b6b7ce086e0372e33f855d913891d624024898 (patch) | |
| tree | a240464c67243dbbbf56451655a399d8cb776a3a | |
| parent | 699762ef4ca90806f8ee95c3f92b5345cedc77a5 (diff) | |
Minor xs_html tweak.
| -rw-r--r-- | xs_html.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -114,7 +114,7 @@ xs_html *xs_html_text(const char *content) xs_html *a = XS_HTML_NEW(); a->type = XS_HTML_TEXT; - a->content = xs_html_encode(content); + a->content = xs_is_string(content) ? xs_html_encode(content) : xs_str_new(NULL); return a; } @@ -126,7 +126,7 @@ xs_html *xs_html_raw(const char *content) xs_html *a = XS_HTML_NEW(); a->type = XS_HTML_TEXT; - a->content = xs_dup(content); + a->content = xs_is_string(content) ? xs_dup(content) : xs_str_new(NULL); return a; } |