Update of /cvsroot/mahogany/M/src/util
In directory usw-pr-cvs1:/tmp/cvs-serv2721/src/util

Modified Files:
        matchurl.cpp 
Log Message:
1. If the URL contains '%', consider it could be wrapped
2. If an URL has '<' just in front, consider it could be wrapped

Index: matchurl.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/util/matchurl.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -b -u -2 -r1.16 -r1.17
--- matchurl.cpp        17 May 2002 09:45:55 -0000      1.16
+++ matchurl.cpp        3 Jun 2002 11:18:47 -0000       1.17
@@ -558,5 +558,6 @@
          // positives so consider that only "long" URLs are wrapped where long
          // URLs are defined as the ones containing the CGI script parameters
-         if ( strcspn(start + len, "?&\r") == (size_t)(p - start - len) )
+         // or some '%' chars (i.e. escaped characters)
+         if ( strcspn(start + len, "%?&\r") == (size_t)(p - start - len) )
          {
             // no CGI parameters, suppose it can't wrap
@@ -590,8 +591,10 @@
          }
 
-         if ( q >= text && *q != '\n' )
+         // Does the URL start at the beginning of the line, or does it have
+         // a '<' just in front?
+         if ( q >= text && *q != '\n' && *q != '<')
             break;
 
-         // it did occur at the start, suppose the URL is wrapped and so
+         // it did occur at the start (or after '<'), suppose the URL is wrapped and 
+so
          // continue on the next line (no need to test the first character,
          // it had been already done above)


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to