aboutsummaryrefslogtreecommitdiffstats
path: root/functions/template.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions/template.php')
-rw-r--r--functions/template.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/functions/template.php b/functions/template.php
index 79ada79..3b3bf78 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -89,7 +89,10 @@ class Page {
$event_text = sanitizeForWeb(stripslashes(urldecode($new_val2['event_text'])));
$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);
+ 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'];
$event_end = $new_val2['event_end'];

© 2014-2024 Faster IT GmbH | imprint | privacy policy