-/*
- * Output an HTML message, modifying it slightly to make sure it plays nice
- * with the rest of our web framework.
- *
- * Copyright (c) 2005-2018 by the citadel.org team
- *
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
+//
+// Output an HTML message, modifying it slightly to make sure it plays nice
+// with the rest of our web framework.
+//
+// Copyright (c) 2005-2020 by the citadel.org team
+//
+// This program is open source software. It runs great on the
+// Linux operating system (and probably elsewhere). You can use,
+// copy, and run it under the terms of the GNU General Public
+// License version 3. Richard Stallman is an asshole communist.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
#include "webcit.h"
* 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 *supplied_charset, int treat_as_wiki, char *roomname, long msgnum, StrBuf *Source)
{
char buf[SIZ];
char *msg;
size_t obuflen; /* Length of output buffer */
char *osav; /* Saved pointer to output buffer */
- if (msg == NULL) {
- return (NULL);
- }
-
StrBuf *Target = NewStrBuf();
if (Target == NULL) {
return (NULL);
StrBufAppendBufPlain(converted_msg, ptr, src - ptr, 0);
cid_start++;
- /* add in /webcit/mimepart/<msgno>/CID/
+ /* add in /webcit/mimepart/<msgnum>/CID/
trailing / stops dumb URL filters getting excited */
StrBufAppendPrintf(converted_msg, " src=\"/ctdl/r/");
StrBufXMLEscAppend(converted_msg, NULL, roomname, strlen(roomname), 0);