Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26029/functions
Modified Files:
template.php
Log Message:
Hyperlink email addresses
Index: template.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v
retrieving revision 1.115
retrieving revision 1.116
diff -C2 -d -r1.115 -r1.116
*** template.php 26 May 2009 20:15:15 -0000 1.115
--- template.php 26 May 2009 20:50:57 -0000 1.116
***************
*** 90,94 ****
$location = sanitizeForWeb(stripslashes(urldecode($new_val2['location'])));
$description = sanitizeForWeb(stripslashes(urldecode($new_val2['description'])));
! if (!empty($description)) $description = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>', $description);
$event_start = $new_val2['event_start'];
--- 90,97 ----
$location = sanitizeForWeb(stripslashes(urldecode($new_val2['location'])));
$description = sanitizeForWeb(stripslashes(urldecode($new_val2['description'])));
! if (!empty($description)) {
! $description = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>', $description);
! $description = ereg_replace("[a-zA-Z0-9_.%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}", '<a href="mailto:\0">\0</a>', $description);
! }
$event_start = $new_val2['event_start'];
|