aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-url-scanner.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-04-18 00:43:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-04-18 00:43:07 +0800
commit223d2354aca8edc805782693069c7bc8d0149db7 (patch)
treebe0279935eb03324d9f529d15cc7ee7f0adcf542 /camel/camel-url-scanner.c
parent78c1eb5c1af5359f6aef675c5eb5f8918a1d8660 (diff)
downloadgsoc2013-evolution-223d2354aca8edc805782693069c7bc8d0149db7.tar
gsoc2013-evolution-223d2354aca8edc805782693069c7bc8d0149db7.tar.gz
gsoc2013-evolution-223d2354aca8edc805782693069c7bc8d0149db7.tar.bz2
gsoc2013-evolution-223d2354aca8edc805782693069c7bc8d0149db7.tar.lz
gsoc2013-evolution-223d2354aca8edc805782693069c7bc8d0149db7.tar.xz
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-url-scanner.c')
-rw-r--r--camel/camel-url-scanner.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/camel/camel-url-scanner.c b/camel/camel-url-scanner.c
index 1151449ffc..8a43b05aee 100644
--- a/camel/camel-url-scanner.c
+++ b/camel/camel-url-scanner.c
@@ -359,6 +359,13 @@ camel_url_web_end (const char *in, const char *pos, const char *inend, urlmatch_
while (inptr < inend && is_urlsafe (*inptr) && *inptr != close_brace)
inptr++;
+ /* urls are extremely unlikely to end with any
+ * punctuation, so strip any trailing
+ * punctuation off. Also strip off any closing
+ * braces. */
+ while (inptr > pos && strchr (",.?!)}]", inptr[-1]))
+ inptr--;
+
break;
default:
break;