Selaa lähdekoodia

Skip ugly line breaks at the beginning of a post's content.

default 2 vuotta sitten
vanhempi
sitoutus
57c9f4b8e9
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      html.c

+ 4 - 0
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 */