diff options
| author | 2023-12-21 07:49:39 +0100 | |
|---|---|---|
| committer | 2023-12-21 07:49:39 +0100 | |
| commit | d9ca841cc99431a614f2aafe8a7563d0536727d8 (patch) | |
| tree | d83ab8ffaa63140842ce7ed3e63ac790c0a2e764 | |
| parent | Check some fwrite() return values in xs_fcgi_response(). (diff) | |
| download | snac2-d9ca841cc99431a614f2aafe8a7563d0536727d8.tar.gz snac2-d9ca841cc99431a614f2aafe8a7563d0536727d8.tar.xz snac2-d9ca841cc99431a614f2aafe8a7563d0536727d8.zip | |
Don't wrap the content in <p></p>; just add a final <p>.
| -rw-r--r-- | html.c | 5 |
1 files changed, 1 insertions, 4 deletions
| @@ -1438,10 +1438,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int local, | |||
| 1438 | 1438 | ||
| 1439 | c = xs_replace_i(c, "<br><br>", "<p>"); | 1439 | c = xs_replace_i(c, "<br><br>", "<p>"); |
| 1440 | 1440 | ||
| 1441 | if (!xs_startswith(c, "<p>")) { | 1441 | c = xs_str_cat(c, "<p>"); |
| 1442 | xs *s1 = c; | ||
| 1443 | c = xs_fmt("<p>%s</p>", s1); | ||
| 1444 | } | ||
| 1445 | 1442 | ||
| 1446 | /* replace the :shortnames: */ | 1443 | /* replace the :shortnames: */ |
| 1447 | c = replace_shortnames(c, xs_dict_get(msg, "tag"), 2); | 1444 | c = replace_shortnames(c, xs_dict_get(msg, "tag"), 2); |