X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=functions%2Furl_parser.php;h=20b1fdae39e54b761009d62e702588d4969daf8d;hb=fe55c7c794596d1febd00277d989bb09fe1dcc1f;hp=66ea2315a21050db963926528c4030fe0da9afcd;hpb=cf0d436aeba404fcede2204d19e03efc2e0422c2;p=squirrelmail.git diff --git a/functions/url_parser.php b/functions/url_parser.php index 66ea2315..20b1fdae 100644 --- a/functions/url_parser.php +++ b/functions/url_parser.php @@ -3,7 +3,7 @@ /** * url_parser.php * - * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Copyright (c) 1999-2003 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * This code provides various string manipulation functions that are @@ -35,7 +35,7 @@ $Email_RegExp_Match = '[0-9a-z]([-_.+]?[0-9a-z])*(%' . $Host_RegExp_Match . ')?@' . $Host_RegExp_Match; function parseEmail (&$body) { - global $color, $Email_RegExp_Match, $compose_new_win; + global $color, $Email_RegExp_Match; $sbody = $body; $addresses = array(); @@ -47,12 +47,7 @@ function parseEmail (&$body) { } /* Replace each email address with a compose URL */ foreach ($addresses as $email) { - $comp_uri = '../src/compose.php?send_to='.urlencode($email); - if ($compose_new_win == '1') { - $comp_uri = 'javascript:void(0)" onClick="comp_in_new(' - . "'$comp_uri'" . ')'; - } - $comp_uri = ''.$email.''; + $comp_uri = makeComposeLink('src/compose.php?send_to='.urlencode($email), $email); $body = str_replace($email, $comp_uri, $body); } /* Return number of unique addresses found */ @@ -82,10 +77,10 @@ function parseUrl (&$body) { global $url_parser_poss_ends, $url_parser_url_tokens;; $start = 0; $blength = strlen($body); - $target_pos = $blength; while ($start != $blength) { $target_token = ''; + $target_pos = $blength; /* Find the first token to replace */ foreach ($url_parser_url_tokens as $the_token) {