summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2023-11-20 18:50:42 +0100
committerGravatar default2023-11-20 18:50:42 +0100
commit7dd1c8a1ba4ff56b2d810f42909ac391ab5b091a (patch)
tree4114216ddb8aef367e5894da15354a48efec4f6a /html.c
parentReplaced encode_html_strict() with xs_html_encode(). (diff)
downloadsnac2-7dd1c8a1ba4ff56b2d810f42909ac391ab5b091a.tar.gz
snac2-7dd1c8a1ba4ff56b2d810f42909ac391ab5b091a.tar.xz
snac2-7dd1c8a1ba4ff56b2d810f42909ac391ab5b091a.zip
Use xs_html in html_footer().
Diffstat (limited to 'html.c')
-rw-r--r--html.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/html.c b/html.c
index 4673130..3472cd4 100644
--- a/html.c
+++ b/html.c
@@ -144,11 +144,9 @@ xs_str *html_actor_icon(xs_str *os, char *actor,
144 if (!xs_is_null(udate)) { 144 if (!xs_is_null(udate)) {
145 xs *sd = xs_crop_i(xs_dup(udate), 0, 10); 145 xs *sd = xs_crop_i(xs_dup(udate), 0, 10);
146 146
147 date_label = xs_str_cat(date_label, " / "); 147 date_label = xs_str_cat(date_label, " / ", sd);
148 date_label = xs_str_cat(date_label, sd);
149 148
150 date_title = xs_str_cat(date_title, " / "); 149 date_title = xs_str_cat(date_title, " / ", udate);
151 date_title = xs_str_cat(date_title, udate);
152 } 150 }
153 151
154 xs *edt = encode_html(date_title); 152 xs *edt = encode_html(date_title);
@@ -1531,17 +1529,22 @@ xs_str *html_entry(snac *user, xs_str *os, const xs_dict *msg, int local,
1531 1529
1532xs_str *html_footer(xs_str *s) 1530xs_str *html_footer(xs_str *s)
1533{ 1531{
1534 xs *s1 = xs_fmt( 1532 xs_html *footer = xs_html_tag("div",
1535 "<div class=\"snac-footer\">\n" 1533 xs_html_attr("class", "snac-footer"),
1536 "<a href=\"%s\">%s</a> - " 1534 xs_html_tag("a",
1537 "powered by <a href=\"%s\">" 1535 xs_html_attr("href", srv_baseurl),
1538 "<abbr title=\"Social Networks Are Crap\">snac</abbr></a></div>\n", 1536 xs_html_text(L("about this site"))),
1539 srv_baseurl, 1537 xs_html_text(" - "),
1540 L("about this site"), 1538 xs_html_text(L("powered by ")),
1541 WHAT_IS_SNAC_URL 1539 xs_html_tag("a",
1542 ); 1540 xs_html_attr("href", WHAT_IS_SNAC_URL),
1543 1541 xs_html_tag("abbr",
1544 return xs_str_cat(s, s1); 1542 xs_html_attr("title", "Social Network Are Crap"),
1543 xs_html_text("snac"))));
1544
1545 xs *s1 = xs_html_render(footer);
1546
1547 return xs_str_cat(s, s1, "\n");
1545} 1548}
1546 1549
1547 1550