From 7e79f496b5a55ea3bc8f43e28969ad26e5de8595 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Tue, 1 Aug 2000 12:49:36 +0000 Subject: [PATCH] fixed minor bug in url parsing that didn't let urls be at beginning of line git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@667 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/url_parser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/url_parser.php b/functions/url_parser.php index a3463143..05aca966 100644 --- a/functions/url_parser.php +++ b/functions/url_parser.php @@ -45,11 +45,12 @@ "ftp://", "telnet://"); for($i = 0; $i < sizeof($url_tokens); $i++) { - if($where = strpos(strtolower($body), $url_tokens[$i], $start)) + if($where = strpos(strtolower("^^".$body), $url_tokens[$i], $start)) break; } //$where = strpos(strtolower($body),"http://",$start); if ($where) { + $where = $where - 2; // because we added the ^^ at the begining # Find the end of that URL reset($poss_ends); $end=0; while (list($key, $val) = each($poss_ends)) { -- 2.25.1