aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-09-15 08:25:12 +0200
committerdefault <nobody@localhost>2024-09-15 08:25:12 +0200
commit57c9f4b8e92d6d3f14b362d9942b524606cf0b58 (patch)
tree795fbff74ba27f4599708a97817255e79e4845e5
parent16a1b207b1e36dbe52fa9ace78e6f13d497e3204 (diff)
Skip ugly line breaks at the beginning of a post's content.
-rw-r--r--html.c4
1 files changed, 4 insertions, 0 deletions
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, "<br>"))
+ content += 4;
+
xs *c = sanitize(content);
/* do some tweaks to the content */