]> git.pld-linux.org Git - packages/eventum.git/commitdiff
- add to PLD CVS
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 29 Dec 2005 20:40:36 +0000 (20:40 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    eventum-link_filter-updates.patch -> 1.1

eventum-link_filter-updates.patch [new file with mode: 0644]

diff --git a/eventum-link_filter-updates.patch b/eventum-link_filter-updates.patch
new file mode 100644 (file)
index 0000000..fdb2aaf
--- /dev/null
@@ -0,0 +1,21 @@
+--- eventum-20051227/include/class.misc.php    2005-12-27 15:35:26.000000000 +0200
++++ /tmp/class.misc.php        2005-12-27 15:34:41.000000000 +0200
+@@ -504,10 +497,15 @@
+      * @param   string $class The CSS class to use on the actual links
+      * @return  string The parsed string
+      */
+-    function activateLinks($text, $class = "link")
++    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);
++        $range = '[-\w+@=?.%/:&;~|,#]+';
++        $text = preg_replace("'(\w+)://($range)(\.)?'", '<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\.$range)(\.\s|\s)'", '$1<a title="open http://$2 in a new window" class="' . $class . '" href="http://$2" target="_$2">$2</a>$3' , $text);
++
++        $mail_pat = '/([-+a-z0-9_.]+@(?:[-a-z0-9_.]{2,63}\.)+[a-z]{2,6})/i';
++        $text = preg_replace($mail_pat, '<a title="open mailto:$1 in a new window" class="' . $class . '" href="mailto:$1" target="_$1">$1</a>' , $text);
++
+         return $text;
+     }
This page took 0.035082 seconds and 4 git commands to generate.