Fix #607, use preg_replace_callback in url_to_link