diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-04-18 00:43:07 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-04-18 00:43:07 +0800 |
commit | 223d2354aca8edc805782693069c7bc8d0149db7 (patch) | |
tree | be0279935eb03324d9f529d15cc7ee7f0adcf542 /camel/camel-mime-filter-tohtml.c | |
parent | 78c1eb5c1af5359f6aef675c5eb5f8918a1d8660 (diff) | |
download | gsoc2013-evolution-223d2354aca8edc805782693069c7bc8d0149db7.tar.gz gsoc2013-evolution-223d2354aca8edc805782693069c7bc8d0149db7.tar.zst gsoc2013-evolution-223d2354aca8edc805782693069c7bc8d0149db7.zip |
Urls are unlikely to end with punctuation or closing braces, so strip any
2003-04-16 Jeffrey Stedfast <fejj@ximian.com>
* camel-url-scanner.c (camel_url_web_end): Urls are unlikely to
end with punctuation or closing braces, so strip any of those off
the end of the url. Fixes bug #41461.
* tests/mime-filter/data/html.1.out: Removed a trailing \n at the
end of the file, this is incorrect (since out input file does not
contain one).
* camel-mime-filter-tohtml.c (html_convert): Only output a <br> if
we found an eoln in the input. Along the same lines, don't write a
'\n' to the output buffer unless we've encountered that eoln in
the input. Fixes bug #41407.
svn path=/trunk/; revision=20882
Diffstat (limited to 'camel/camel-mime-filter-tohtml.c')
-rw-r--r-- | camel/camel-mime-filter-tohtml.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/camel/camel-mime-filter-tohtml.c b/camel/camel-mime-filter-tohtml.c index ca10d3d438..0ffd1ed26b 100644 --- a/camel/camel-mime-filter-tohtml.c +++ b/camel/camel-mime-filter-tohtml.c @@ -320,12 +320,15 @@ html_convert (CamelMimeFilter *filter, char *in, size_t inlen, size_t prespace, outptr = g_stpcpy (outptr, "</font>"); } - if (html->flags & CAMEL_MIME_FILTER_TOHTML_CONVERT_NL) { - outptr = check_size (filter, outptr, &outend, 5); - outptr = g_stpcpy (outptr, "<br>"); + if (inptr < inend) { + if (html->flags & CAMEL_MIME_FILTER_TOHTML_CONVERT_NL) { + outptr = check_size (filter, outptr, &outend, 5); + outptr = g_stpcpy (outptr, "<br>"); + } + + *outptr++ = '\n'; } - *outptr++ = '\n'; start = ++inptr; } while (inptr < inend); |