From: Wilfried Göesgens Date: Thu, 12 Jul 2007 22:29:19 +0000 (+0000) Subject: * fix the 'trilcat pastes url in webcit with trash at the end' incident. X-Git-Tag: v7.86~3233 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=9c8d4cdfbd524e2b89622528fd5628291ebaed7c * fix the 'trilcat pastes url in webcit with trash at the end' incident. --- diff --git a/webcit/html2html.c b/webcit/html2html.c index da668c71c..b15455b67 100644 --- a/webcit/html2html.c +++ b/webcit/html2html.c @@ -376,6 +376,23 @@ void output_html(char *supplied_charset, int treat_as_wiki) { if (linklen > 0) break; } if (linklen > 0) { + char *ltreviewptr; + char *nbspreviewptr; + //* spot for some subject strings tinymce tends to give us. + ltreviewptr = strchr(ptr, '<'); + if (ltreviewptr != NULL) { + *ltreviewptr = '\0'; + linklen = ltreviewptr - ptr; + } + + nbspreviewptr = strstr(ptr, " "); + if (nbspreviewptr != NULL) { + ///*nbspreviewptr = '\0'; + linklen = nbspreviewptr - ptr; + } + if (ltreviewptr != 0) + *ltreviewptr = '<'; + content_length += (32 + linklen); if (content_length >= converted_alloc) { converted_alloc += 8192;