From 21185d642546b081924a541bad2adcaad9416fca Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 6 Dec 2019 22:10:31 -0500 Subject: [PATCH] Suppress output of inline HTML styles when converting to plain text --- libcitadel/lib/html_to_ascii.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.30.2