Changeset 7452 for trunk/wp-includes/formatting.php
- Timestamp:
- 03/21/2008 04:29:59 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r7190 r7452 632 632 633 633 function _make_url_clickable_cb($matches) { 634 $ret = ''; 634 635 $url = $matches[2]; 635 636 $url = clean_url($url); 636 637 if ( empty($url) ) 637 638 return $matches[0]; 638 return $matches[1] . "<a href=\"$url\" rel=\"nofollow\">$url</a>"; 639 // removed trailing [.,;:] from URL 640 if ( in_array(substr($url, -1), array('.', ',', ';', ':')) === true ) { 641 $ret = substr($url, -1); 642 $url = substr($url, 0, strlen($url)-1); 643 } 644 return $matches[1] . "<a href=\"$url\" rel=\"nofollow\">$url</a>" . $ret; 639 645 } 640 646 641 647 function _make_web_ftp_clickable_cb($matches) { 648 $ret = ''; 642 649 $dest = $matches[2]; 643 650 $dest = 'http://' . $dest; … … 645 652 if ( empty($dest) ) 646 653 return $matches[0]; 647 648 return $matches[1] . "<a href=\"$dest\" rel=\"nofollow\">$dest</a>"; 654 // removed trailing [,;:] from URL 655 if ( in_array(substr($dest, -1), array('.', ',', ';', ':')) === true ) { 656 $ret = substr($dest, -1); 657 $dest = substr($dest, 0, strlen($dest)-1); 658 } 659 return $matches[1] . "<a href=\"$dest\" rel=\"nofollow\">$dest</a>" . $ret; 649 660 } 650 661
Note: See TracChangeset
for help on using the changeset viewer.