aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfenner <fenner>2002-10-23 00:49:00 +0000
committerfenner <fenner>2002-10-23 00:49:00 +0000
commitb47447cb9460cb6b0a7775014fa334ae74dea1b6 (patch)
treed6bd92a10b730d7a8e0455ce21dc3ce5ddd9f036
parent90ee7f7dc55bca21abc9a0b1662208c2c6c5f8f5 (diff)
downloadphpicalendar-b47447cb9460cb6b0a7775014fa334ae74dea1b6.tar.gz
phpicalendar-b47447cb9460cb6b0a7775014fa334ae74dea1b6.tar.bz2
phpicalendar-b47447cb9460cb6b0a7775014fa334ae74dea1b6.zip
Make URLs in event descriptions clickable.
-rw-r--r--event.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/event.php b/event.php
index a5fdcc8..2a58efd 100644
--- a/event.php
+++ b/event.php
@@ -75,7 +75,9 @@ $calendar_name2 = str_replace('\\', '', $calendar_name2);
<?php if ($description) { ?>
<tr>
<td width="1%"><img src="images/spacer.gif" width="6" height="1"></td>
- <td align="left" colspan="2" class="V12"><?php echo $description; ?></td>
+ <td align="left" colspan="2" class="V12">
+ <?php echo ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
+ '<a target="_new" href="\0">\0</a>', $description); ?></td>
</tr>
<?php } ?>
@@ -85,4 +87,4 @@ $calendar_name2 = str_replace('\\', '', $calendar_name2);
</table>
</center>
</body>
-</html> \ No newline at end of file
+</html>

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