aboutsummaryrefslogtreecommitdiff
path: root/xs_html.h
diff options
context:
space:
mode:
authorshtrophic <christoph@liebender.dev>2025-02-15 14:37:36 +0100
committershtrophic <christoph@liebender.dev>2025-02-15 14:37:36 +0100
commit7611a6bee4bcbad2f1710aafa99aba730e5cf995 (patch)
tree33ab7bee30379e16f6869b2efda5494be8aeb858 /xs_html.h
parent3d96c576287736ebdf87e4a7b956842a6c6e055f (diff)
parent3d705b22a67ee913b9bd4473277430bd481cef25 (diff)
Merge tag '2.72' into curl-smtp
Version 2.72 RELEASED.
Diffstat (limited to 'xs_html.h')
-rw-r--r--xs_html.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/xs_html.h b/xs_html.h
index 8331f93..29886c6 100644
--- a/xs_html.h
+++ b/xs_html.h
@@ -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;
}