From f957be5e842c1100cb377a91c2e3455f7288c99d Mon Sep 17 00:00:00 2001 From: default Date: Tue, 1 Nov 2022 19:32:42 +0100 Subject: [PATCH] Filter out carriage returns in note post web interface. --- html.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/html.c b/html.c index 46ff63d..5ec6e17 100644 --- a/html.c +++ b/html.c @@ -982,10 +982,11 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, } if (content != NULL) { - xs *msg = NULL; - xs *c_msg = NULL; + xs *msg = NULL; + xs *c_msg = NULL; + xs *content_2 = xs_replace(content, "\r", ""); - msg = msg_note(&snac, content, NULL, in_reply_to, attach_list); + msg = msg_note(&snac, content_2, NULL, in_reply_to, attach_list); c_msg = msg_create(&snac, msg);