supplering til eriks kommentar:
function tagster_url($str, $target, $css_class) {
$ins_str = "";
if ($css_class) $ins_str .= " class=\"".$css_class."\"";
if ($target) $ins_str .= " target=\"".$target."\"";
$str = tagster_expand($str);
$str = preg_replace ("/(ftp|http|https|telnet|news|nntp|file|irc):\/\/([a-z0-9~#%@&:;=!',_æøå\(\)\?\/\.\-\+\[\]\|\*\$\^\{\}]+)/i", "<a href=\"\\1://\\2\"".$ins_str.">\\1://\\2</a>", $str);
$str = preg_replace ("/(\s|tp\:|\(|\[|\>)(www\.)([a-z0-9~#%@&:;=!',_æøå\(\)\?\/\.\-\+\[\]\|\*\$\^\{\}]+)/i", "\\1<a href=\"
http://\\2\\3\"".$ins_str.">\\2\\3</a>", $str);
$str = preg_replace ("/(\s|tp\:|\(|\[|\>)(ftp\.)([a-z0-9~#%@&:;=!',_æøå\(\)\?\/\.\-\+\[\]\|\*\$\^\{\}]+)/i", "\\1<a href=\"
ftp://\\2\\3\"".$ins_str.">\\2\\3</a>", $str);
return tagster_reduce($str);
}