From: Art Cancro Date: Sat, 7 Dec 2019 03:10:31 +0000 (-0500) Subject: Suppress output of inline HTML styles when converting to plain text X-Git-Tag: v939~256 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=21185d642546b081924a541bad2adcaad9416fca Suppress output of inline HTML styles when converting to plain text --- diff --git a/libcitadel/lib/html_to_ascii.c b/libcitadel/lib/html_to_ascii.c index 5ea1e2756..45beb2cbb 100644 --- a/libcitadel/lib/html_to_ascii.c +++ b/libcitadel/lib/html_to_ascii.c @@ -197,7 +197,7 @@ char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth) { strcat(outbuf, nl); } -/**** +#if 0 These seemed like a good idea at the time, but it just makes a mess. else if ( @@ -224,7 +224,7 @@ char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth) { ) { strcat(outbuf, "_"); } -****/ +#endif else if (!strcasecmp(tag, "BR")) { strcat(outbuf, nl); @@ -274,7 +274,7 @@ char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth) { tag[strlen(tag)] = ch; } - else if (!nest) { + else if ((!nest) && (styletag == 0)) { outbuf[strlen(outbuf)+1] = 0; outbuf[strlen(outbuf)] = ch; }