]> git.pld-linux.org Git - packages/eventum.git/commitdiff
- include tilde into url when activating links
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 9 Apr 2005 16:18:03 +0000 (16:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    eventum-link-tilde2.patch -> 1.1

eventum-link-tilde2.patch [new file with mode: 0644]

diff --git a/eventum-link-tilde2.patch b/eventum-link-tilde2.patch
new file mode 100644 (file)
index 0000000..1f5aff5
--- /dev/null
@@ -0,0 +1,16 @@
+include tilde into url when activating links, so that urls like
+http://www.example.com/~user also work
+
+--- ./include/class.misc.php   2005-03-31 01:48:36.000000000 +0300
++++ ./include/class.misc.php~  2005-03-31 01:48:34.000000000 +0300
+@@ -480,8 +480,8 @@
+      */
+     function activateLinks($text, $class = "link")
+     {
+-        $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);
+-        $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);
++        $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);
++        $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);
+         return $text;
+     }
This page took 0.076079 seconds and 4 git commands to generate.