From 6ae12b03d5566b9119c78d79a96df7ac12b2c636 Mon Sep 17 00:00:00 2001 From: grunfink Date: Wed, 26 Aug 2026 07:24:25 +0200 Subject: In the people page, strip absurdly long location coordinates due to floating point inaccuracies. --- html.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'html.c') diff --git a/html.c b/html.c index 8cb2370..3f35040 100644 --- a/html.c +++ b/html.c @@ -3899,7 +3899,10 @@ xs_html *html_people_list(snac *user, xs_list *list, const char *header, const c const char *lo = xs_is_string(longitude) ? longitude : xs_number_str(longitude); if (xs_is_string(la) && xs_is_string(lo)) { - xs *label = xs_fmt("%s,%s", la, lo); + xs *sla = xs_utf8_crop_i(xs_dup(la), 0, 7); + xs *slo = xs_utf8_crop_i(xs_dup(lo), 0, 7); + + xs *label = xs_fmt("%s,%s", sla, slo); xs *url = xs_fmt("https://openstreetmap.org/search?query=%s,%s", la, lo); xs_html_add(snac_post, -- cgit