[balsa] mime.c: Do not match a trailing period



commit 57c474ee0e04830920bed4725a65017ecb8c6e1e
Author: Albrecht Dreß <albrecht dress arcor de>
Date:   Sat Mar 23 18:02:40 2019 -0400

    mime.c: Do not match a trailing period
    
    Do not include a trailing period ('.') when matching an URL.
    Most often it's end-of-sentence punctuation rather than part of
    the URL. See the thread at
    <URL:https://mail.gnome.org/archives/balsa-list/2018-July/msg00000.html>.
    
    * libbalsa/mime.c (get_url_reg): do not match a trailing period.

 ChangeLog       | 9 +++++++++
 libbalsa/mime.c | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/ChangeLog b/ChangeLog
index ca86d795f..0b9ba141d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2019-03-23  Albrecht Dreß  <albrecht dress arcor de>
+
+       Do not include a trailing period ('.') when matching an URL.
+       Most often it's end-of-sentence punctuation rather than part of
+       the URL. See the thread at
+       <URL:https://mail.gnome.org/archives/balsa-list/2018-July/msg00000.html>.
+
+       * libbalsa/mime.c (get_url_reg): do not match a trailing period.
+
 2019-03-21  Albrecht Dreß  <albrecht dress arcor de>
 
        I noticed that /sometimes/ closing the config dialogue of an
diff --git a/libbalsa/mime.c b/libbalsa/mime.c
index e6784dc8b..32f91b085 100644
--- a/libbalsa/mime.c
+++ b/libbalsa/mime.c
@@ -858,7 +858,8 @@ get_url_reg(void)
     static struct url_regex_info info = {
         NULL,
         "(((https?|ftps?|nntp)://)|(mailto:|news:))"
-            "(%[0-9A-F]{2}|[-_.!~*';/?:@&=+$,#[:alnum:]])+",
+            "(%[0-9A-F]{2}|[-_.!~*';/?:@&=+$,#[:alnum:]])+"
+            "(%[0-9A-F]{2}|[-_!~*';/?:@&=+$,#[:alnum:]])",
         __func__,
         "url regex compilation failed"
     };


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]