X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fhtml2html.c;h=110d9682e31d937ffa35a47ee621b75f860431eb;hb=f9f392b97bb7b510c25dcd72db49c747715784b9;hp=271dbe14376e9f2a8578878a27ad2468fb56c7ec;hpb=f1150bc22d7ffb84b337b7ca3860f13c706d90be;p=citadel.git diff --git a/webcit/html2html.c b/webcit/html2html.c index 271dbe143..110d9682e 100644 --- a/webcit/html2html.c +++ b/webcit/html2html.c @@ -24,14 +24,21 @@ #include #include #include + +#ifdef HAVE_ICONV +#include +#endif + #include "webcit.h" #include "vcard.h" #include "webserver.h" /* + * Sanitize and enhance an HTML message for display. + * Also convert weird character sets to UTF-8 if necessary. */ -void output_html(void) { +void output_html(char *charset) { char buf[SIZ]; char *msg; char *ptr; @@ -47,6 +54,14 @@ void output_html(void) { int alevel = 0; int i; int linklen; +#ifdef HAVE_ICONV + iconv_t ic = (iconv_t)(-1) ; + char *ibuf; /* Buffer of characters to be converted */ + char *obuf; /* Buffer for converted characters */ + size_t ibuflen; /* Length of input buffer */ + size_t obuflen; /* Length of output buffer */ + char *osav; /* Saved pointer to output buffer */ +#endif msg = strdup(""); sprintf(new_window, "