diff options
| author | default <nobody@localhost> | 2025-02-05 10:52:14 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2025-02-05 10:52:14 +0100 |
| commit | 61d399a3682c4e4c488d3a2ae806cde372199280 (patch) | |
| tree | a82064307c4fb676b2204daa2ce15445977bc638 /html.c | |
| parent | 0da936901283db8c5de5b6470ffd911ac8b300fe (diff) | |
| parent | 43812a3721b8917eea7c0bbe6d3636d4d74923bc (diff) | |
Merge branch 'master' of grunfink-codeberg:grunfink/snac2
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 30 |
1 files changed, 20 insertions, 10 deletions
@@ -553,10 +553,11 @@ xs_html *html_instance_head(void) static xs_html *html_instance_body(void) { - const char *host = xs_dict_get(srv_config, "host"); - const char *sdesc = xs_dict_get(srv_config, "short_description"); - const char *email = xs_dict_get(srv_config, "admin_email"); - const char *acct = xs_dict_get(srv_config, "admin_account"); + const char *host = xs_dict_get(srv_config, "host"); + const char *sdesc = xs_dict_get(srv_config, "short_description"); + const char *sdescraw = xs_dict_get(srv_config, "short_description_raw"); + const char *email = xs_dict_get(srv_config, "admin_email"); + const char *acct = xs_dict_get(srv_config, "admin_account"); xs *blurb = xs_replace(snac_blurb, "%host%", host); @@ -569,12 +570,21 @@ static xs_html *html_instance_body(void) dl = xs_html_tag("dl", NULL))); if (sdesc && *sdesc) { - xs_html_add(dl, - xs_html_tag("di", - xs_html_tag("dt", - xs_html_text(L("Site description"))), - xs_html_tag("dd", - xs_html_text(sdesc)))); + if (!xs_is_null(sdescraw) && xs_type(sdescraw) == XSTYPE_TRUE) { + xs_html_add(dl, + xs_html_tag("di", + xs_html_tag("dt", + xs_html_text(L("Site description"))), + xs_html_tag("dd", + xs_html_raw(sdesc)))); + } else { + xs_html_add(dl, + xs_html_tag("di", + xs_html_tag("dt", + xs_html_text(L("Site description"))), + xs_html_tag("dd", + xs_html_text(sdesc)))); + } } if (email && *email) { xs *mailto = xs_fmt("mailto:%s", email); |