Update of /cvsroot/mahogany/M/src/util
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8943/src/util

Modified Files:
        matchurl.cpp 
Log Message:
fixed parsing of mailto: with domains having only a single dot

Index: matchurl.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/util/matchurl.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -b -u -2 -r1.33 -r1.34
--- matchurl.cpp        15 Jul 2004 21:52:02 -0000      1.33
+++ matchurl.cpp        20 Jul 2004 14:14:22 -0000      1.34
@@ -760,9 +760,12 @@
       p--;
 
+   // additional checks for the matches which didn't have an explicit scheme
+   if ( isMail || text[pos + len - 1] != _T(':') )
+   {
    // '@' matches may result in false positives, as not every '@' character
    // is inside a mailto URL so try to weed them out by requiring that the
    // mail address has a reasonable minimal length ("[EMAIL PROTECTED]" and
-   // "www.xyz.fr" are probably the shortest ones we can have, hence 10) which
-   // at least avoids matching the bare '@'s
+      // "www.xyz.fr" are probably the shortest ones we can have, hence 10)
+      // which at least avoids matching the bare '@'s
    bool good = (p - start) >= 10;
 
@@ -789,5 +792,5 @@
    if ( !good )
    {
-      int offDiff = pos + len + 1;
+         const int offDiff = pos + len;
       offset += offDiff;
       text += offDiff;
@@ -796,4 +799,5 @@
       goto match;
    }
+   }
 
    // return the length of the match



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to