* src/textview.c
[claws.git] / src / textview.c
index c50a87a08f6f2937563a7a2f7006537e848e5f97..5489d231b91783087702a0c20963457169cc59f2 100644 (file)
@@ -850,6 +850,7 @@ static gboolean get_email_part(const gchar *start, const gchar *scanpos,
        static GHashTable *dom_tab;
        const gchar *last_dot = NULL;
        const gchar *prelast_dot = NULL;
+       const gchar *last_tld_char = NULL;
 
        /* the informative part of the email address (describing the name
         * of the email address owner) may contain quoted parts. the
@@ -901,8 +902,12 @@ static gboolean get_email_part(const gchar *start, const gchar *scanpos,
                if (last_dot == NULL || (scanpos + 1 >= last_dot))
                        return FALSE;
                last_dot++;
-       
-               if (is_toplvl_domain(dom_tab, last_dot, ep_))
+
+               for (last_tld_char = last_dot; last_tld_char < ep_; last_tld_char++)
+                       if (*last_tld_char == '?')
+                               break;
+
+               if (is_toplvl_domain(dom_tab, last_dot, last_tld_char))
                        result = TRUE;
 
                *ep = ep_;