Suppress output of inline HTML styles when converting to plain text
authorArt Cancro <ajc@citadel.org>
Sat, 7 Dec 2019 03:10:31 +0000 (22:10 -0500)
committerArt Cancro <ajc@citadel.org>
Sat, 7 Dec 2019 03:10:31 +0000 (22:10 -0500)
libcitadel/lib/html_to_ascii.c

index 5ea1e27..45beb2c 100644 (file)
@@ -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;
                        }