]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/server/html2html.c
Handle start and end times together
[citadel.git] / webcit-ng / server / html2html.c
index d99877c89fd572edae3d24935d9448afaa097f95..8fb8be6305a6975cd27aa95f5afbc0508ead4678 100644 (file)
@@ -1,7 +1,7 @@
 // Output an HTML message, modifying it slightly to make sure it plays nice
 // with the rest of our web framework.
 //
-// Copyright (c) 2005-2022 by the citadel.org team
+// Copyright (c) 2005-2024 by the citadel.org team
 //
 // This program is open source software.  Use, duplication, or disclosure is subject to the GNU General Public License v3.
 
@@ -82,7 +82,7 @@ void extract_charset_from_meta(char *charset, char *meta_http_equiv, char *meta_
 // Sanitize and enhance an HTML message for display.
 // Also convert weird character sets to UTF-8 if necessary.
 // Also fixup img src="cid:..." type inline images to fetch the image
-StrBuf *html2html(const char *supplied_charset, int treat_as_wiki, char *roomname, long msgnum, StrBuf *Source) {
+StrBuf *html2html(const char *charset_in, int treat_as_wiki, char *roomname, long msgnum, StrBuf *Source) {
        char buf[SIZ];
        char *msg;
        char *ptr;
@@ -114,7 +114,7 @@ StrBuf *html2html(const char *supplied_charset, int treat_as_wiki, char *roomnam
                return (NULL);
        }
 
-       safestrncpy(charset, supplied_charset, sizeof charset);
+       safestrncpy(charset, charset_in, sizeof charset);
        sprintf(new_window, "<a target=\"%s\" href=", TARGET);
 
        content_length = StrLength(Source);
@@ -502,7 +502,7 @@ StrBuf *html2html(const char *supplied_charset, int treat_as_wiki, char *roomnam
        // Output our big pile of markup
        StrBufAppendBuf(Target, converted_msg, 0);
 
-      BAIL:                    // A little trailing vertical whitespace...
+BAIL:  // A little trailing vertical whitespace...
        StrBufAppendPrintf(Target, "<br>\n");
 
        // Now give back the memory