From 57c9f4b8e92d6d3f14b362d9942b524606cf0b58 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 15 Sep 2024 08:25:12 +0200 Subject: [PATCH] Skip ugly line breaks at the beginning of a post's content. --- html.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html.c b/html.c index aced4ad..eec1760 100644 --- a/html.c +++ b/html.c @@ -1726,6 +1726,10 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only, content = ""; } + /* skip ugly line breaks at the beginning */ + while (xs_startswith(content, "
")) + content += 4; + xs *c = sanitize(content); /* do some tweaks to the content */