Changeset 20 for trunk/bb-includes/formatting-functions.php
- Timestamp:
- 12/28/2004 08:26:19 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/bb-includes/formatting-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-includes/formatting-functions.php
r17 r20 125 125 } 126 126 127 function bb_make_clickable($ret) { 128 $ret = ' ' . $ret . ' '; 129 $ret = preg_replace("#([\s>])(https?)://([^\s<>{}()]+[^\s.,<>{}()])#i", "$1<a href='$2://$3'>$2://$3</a>", $ret); 130 $ret = preg_replace("#(\s)www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^ <>{}()\n\r]*[^., <>{}()\n\r]?)?)#i", "$1<a href='http://www.$2.$3$4'>www.$2.$3$4</a>", $ret); 131 $ret = preg_replace("#(\s)([a-z0-9\-_.]+)@([^,< \n\r]+)#i", "$1<a href=\"mailto:$2@$3\">$2@$3</a>", $ret); 132 $ret = trim($ret); 133 return $ret; 134 } 135 127 136 ?>
Note: See TracChangeset
for help on using the changeset viewer.