protected function doAutoLinks($text)
{
$text = preg_replace_callback('{<((https?|ftp|dict):[^\'">\\s]+)>}i', array(&$this, '_doAutoLinks_url_callback'), $text);
# Email addresses: <[email protected]>
$text = preg_replace_callback('{
<
(?:mailto:)?
(
(?:
[-!#$%&\'*+/=?^_`.{|}~\\w\\x80-\\xFF]+
|
".*?"
)
\\@
(?:
[-a-z0-9\\x80-\\xFF]+(\\.[-a-z0-9\\x80-\\xFF]+)*\\.[a-z]+
|
\\[[\\d.a-fA-F:]+\\] # IPv4 & IPv6
)
)
>
}xi', array(&$this, '_doAutoLinks_email_callback'), $text);
return $text;
}