From 9c8d4cdfbd524e2b89622528fd5628291ebaed7c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Thu, 12 Jul 2007 22:29:19 +0000 Subject: [PATCH] * fix the 'trilcat pastes url in webcit with trash at the end' incident. --- webcit/html2html.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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; -- 2.30.2