Hi folks! Im running this forum for Flash users and I have created it in Flash. Now, I've got this little problem... If a users writes a URL like http://www.test.com, the url becomes clickable thanks to the code below.
$text = str_replace("<", "<", $text); $text = str_replace(">", ">", $text); $text = str_replace("www.", "http://www.", $text); $text = str_replace("http://http://", "http://", $text); $text = eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "<u><a href=\"\\1://\\2\\3\" target=\"_blank\">\\1://\\2\\3</a></u>", $text); $text = eregi_replace("(([a-z0-9_]|\\-|\\.)+@([^[:space:]]*)([[:alnum:]-]))", "<u><a href=\"mailto:\\1\">\\1</a></u>", $text); $text = urlencode($text); Everything works just fine, until someone writes <a href="http://www.test.com">http://www.test.com</a>. The output then becomes <a href="<a href="http://www.test.com" target="_blank">http://www.test.com</a> target="_blank">http://www.test.com</a>. Does anyone have a solution for this? Regards Anders Henke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php