From 9135c64dcb9eb6ff2174098f07ee929760a87ac2 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 22 Apr 2009 02:25:02 +0000 Subject: [PATCH] * Handle wandering punctuation in charset definitions. This fixes the most common WebCit crash being experienced since the 7.50 release. Committing to both trunk and stable-75x. --- webcit/html2html.c | 56 ++++++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/webcit/html2html.c b/webcit/html2html.c index 289a7e51f..2e19e58e9 100644 --- a/webcit/html2html.c +++ b/webcit/html2html.c @@ -70,6 +70,9 @@ void extract_charset_from_meta(char *charset, char *meta_http_equiv, char *meta_ strcpy(charset, "UTF-8"); } + /* Remove wandering punctuation */ + if ((ptr=strchr(charset, '\"'))) *ptr = 0; + striplt(charset); } } @@ -395,15 +398,26 @@ void output_html(const char *supplied_charset, int treat_as_wiki, int msgnum, St /** Fixup '); + + /* FIXME - handle this situation (maybe someone opened an ", 3)) --alevel; } - if (!strncasecmp(ptr, "", 3)) --alevel; } + if (BodyArea != NULL) { StrBufAppendBufPlain(converted_msg, HKEY(""), 0); FreeStrBuf(&BodyArea); -- 2.30.2