public static function parseLink($text)
{
$text = preg_replace('/'/', ''', $text);
// IE does not handle ' entity!
$sectionHtmlPattern = '% # Rev:20100913_0900 github.com/jmrware/LinkifyURL
# Section text into HTML <A> tags and everything else.
( # $1: Everything not HTML <A> tag.
[^<]+(?:(?!<a\\b)<[^<]*)* # non A tag stuff starting with non-"<".
| (?:(?!<a\\b)<[^<]*)+ # non A tag stuff starting with "<".
) # End $1.
| ( # $2: HTML <A...>...</A> tag.
<a\\b[^>]*> # <A...> opening tag.
[^<]*(?:(?!</a\\b)<[^<]*)* # A tag contents.
</a\\s*> # </A> closing tag.
) # End $2:
%ix';
return preg_replace_callback($sectionHtmlPattern, array(__CLASS__, '_linkifyCallback'), $text);
}