From f4633b9356ff26deb12587bf922db9b82c0e0bda Mon Sep 17 00:00:00 2001 From: default Date: Fri, 24 Nov 2023 00:05:45 +0100 Subject: Use xs_html in the static greeting page. --- httpd.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'httpd.c') diff --git a/httpd.c b/httpd.c index c398c05..3f4e9f0 100644 --- a/httpd.c +++ b/httpd.c @@ -10,6 +10,7 @@ #include "xs_time.h" #include "xs_openssl.h" #include "xs_fcgi.h" +#include "xs_html.h" #include "snac.h" @@ -98,32 +99,37 @@ static xs_str *greeting_html(void) /* does it have a %userlist% mark? */ if (xs_str_in(s, "%userlist%") != -1) { - const char *host = xs_dict_get(srv_config, "host"); + char *host = xs_dict_get(srv_config, "host"); xs *list = user_list(); - xs_list *p; + xs_list *p = list; xs_str *uid; - xs *ul = xs_str_new("\n"); - - s = xs_replace_i(s, "%userlist%", ul); + xs *s1 = xs_html_render(ul); + s = xs_replace_i(s, "%userlist%", s1); } } -- cgit v1.2.3