From de0eab6118786f81de402fbef2f6d6ec116994aa Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 9 Sep 2011 13:04:25 -0400 Subject: [PATCH] Added a couple more entity declarations --- libcitadel/lib/html_to_ascii.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libcitadel/lib/html_to_ascii.c b/libcitadel/lib/html_to_ascii.c index faa343710..6e4600ab1 100644 --- a/libcitadel/lib/html_to_ascii.c +++ b/libcitadel/lib/html_to_ascii.c @@ -469,6 +469,16 @@ char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth, int do_ci strcpy(&outbuf[i+1], &outbuf[i+7]); } + else if (!strncasecmp(&outbuf[i], "’", 7)) { + outbuf[i] = '\''; + strcpy(&outbuf[i+1], &outbuf[i+7]); + } + + else if (!strncasecmp(&outbuf[i], "–", 7)) { + outbuf[i] = '-'; + strcpy(&outbuf[i+1], &outbuf[i+7]); + } + /* two-digit decimal equivalents */ else if (outbuf[i] == '&' && outbuf[i + 1] == '#' && @@ -508,7 +518,7 @@ char *html_to_ascii(const char *inputmsg, int msglen, int screenwidth, int do_ci scanch = 0; sscanf(&outbuf[i+2], "%04d", &scanch); outbuf[i] = scanch; - strcpy(&outbuf[i+1], &outbuf[i+6]); + strcpy(&outbuf[i+1], &outbuf[i+7]); } } -- 2.30.2