aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-url-scanner.c
diff options
context:
space:
mode:
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;