diff options
author | fenner <fenner> | 2002-10-23 00:49:00 +0000 |
---|---|---|
committer | fenner <fenner> | 2002-10-23 00:49:00 +0000 |
commit | b47447cb9460cb6b0a7775014fa334ae74dea1b6 (patch) | |
tree | d6bd92a10b730d7a8e0455ce21dc3ce5ddd9f036 | |
parent | 90ee7f7dc55bca21abc9a0b1662208c2c6c5f8f5 (diff) | |
download | phpicalendar-b47447cb9460cb6b0a7775014fa334ae74dea1b6.tar.gz phpicalendar-b47447cb9460cb6b0a7775014fa334ae74dea1b6.tar.bz2 phpicalendar-b47447cb9460cb6b0a7775014fa334ae74dea1b6.zip |
Make URLs in event descriptions clickable.
-rw-r--r-- | event.php | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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> |