1 include tilde into url when activating links, so that urls like
2 http://www.example.com/~user also work
4 --- ./include/class.misc.php 2005-03-31 01:48:36.000000000 +0300
5 +++ ./include/class.misc.php~ 2005-03-31 01:48:34.000000000 +0300
8 function activateLinks($text, $class = "link")
10 - $text = preg_replace("'(\w+)://([\w\+\-\@\=\?\.\%\/\:\&\;]+)(\.)?'", "<a title=\"open \\1://\\2 in a new window\" class=\"$class\" href=\"\\1://\\2\" target=\"_\\2\">\\1://\\2</a>", $text);
11 - $text = preg_replace("'(\s+)www.([\w\+\-\@\=\?\.\%\/\:\&\;]+)(\.\s|\s)'", "\\1<a title=\"open http://www.\\2 in a new window\" class=\"$class\" href=\"http://www.\\2\" target=\"_\\2\">www.\\2</a>\\3" , $text);
12 + $text = preg_replace("'(\w+)://([\w\+\-\@\=\?\.\%\/\:\&\;~]+)(\.)?'", "<a title=\"open \\1://\\2 in a new window\" class=\"$class\" href=\"\\1://\\2\" target=\"_\\2\">\\1://\\2</a>", $text);
13 + $text = preg_replace("'(\s+)www.([\w\+\-\@\=\?\.\%\/\:\&\;~]+)(\.\s|\s)'", "\\1<a title=\"open http://www.\\2 in a new window\" class=\"$class\" href=\"http://www.\\2\" target=\"_\\2\">www.\\2</a>\\3" , $text);