Multiple URLs on one line weren't getting parsed correctly
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 12 Jul 2004 07:53:37 +0000 (07:53 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 12 Jul 2004 07:53:37 +0000 (07:53 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7755 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/url_parser.php

index 9e35726..82da797 100644 (file)
@@ -111,7 +111,7 @@ function parseUrl (&$body) {
         /* Find the first token to replace */
         foreach ($url_parser_url_tokens as $the_token) {
             $pos = strpos(strtolower($body), $the_token, $start);
-            if (is_int($pos) && $pos < $blength) {
+            if (is_int($pos) && $pos < $target_pos) {
                 $target_pos   = $pos;
                 $target_token = $the_token;
             }