diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-09-27 20:48:55 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-09-28 00:12:57 +0200 |
| commit | 94ddbec88e57fe742f219a30145650165887f22c (patch) | |
| tree | b605b87b003927eb86cf8d78bae934b06b50ec5a /include | |
| parent | bdfbd076f2d3e7212f300bf5edbbad1934fae324 (diff) | |
html: Make html_encode public
Among other reasons, this function can be useful to sanitize
user-generated content before assigning it do a node.
Diffstat (limited to 'include')
| -rw-r--r-- | include/libweb/html.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libweb/html.h b/include/libweb/html.h index e62575e..37be86e 100644 --- a/include/libweb/html.h +++ b/include/libweb/html.h @@ -5,6 +5,7 @@ struct html_node *html_node_alloc(const char *element); void html_node_free(struct html_node *n); +char *html_encode(const char *s); int html_node_set_value(struct html_node *n, const char *val); int html_node_set_value_unescaped(struct html_node *n, const char *val); int html_node_add_attr(struct html_node *n, const char *attr, const char *val); |
