diff options
| author | grunfink <grunfink@comam.es> | 2026-08-26 07:24:25 +0200 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2026-08-26 07:24:25 +0200 |
| commit | 6ae12b03d5566b9119c78d79a96df7ac12b2c636 (patch) | |
| tree | f2319e1ec9edbb8f7d01ec3cef680012610b3720 | |
| parent | 99544bf77226f2889bb1969eea440b2c8716b814 (diff) | |
In the people page, strip absurdly long location coordinates due to floating point inaccuracies.
| -rw-r--r-- | html.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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, |