]> git.pld-linux.org Git - packages/eventum.git/blob - eventum-link-tilde2.patch
- include tilde into url when activating links
[packages/eventum.git] / eventum-link-tilde2.patch
1 include tilde into url when activating links, so that urls like
2 http://www.example.com/~user also work
3
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
6 @@ -480,8 +480,8 @@
7       */
8      function activateLinks($text, $class = "link")
9      {
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);
14          return $text;
15      }
16  
This page took 0.075666 seconds and 3 git commands to generate.