Ticket #2889: functions-formatting.php.diff
File functions-formatting.php.diff, 1.0 KB (added by , 19 years ago) |
---|
-
functions-formatting.php
501 501 return $newtext; 502 502 } 503 503 504 function force_balance_tags($text) {505 return balanceTags($text, 0, true);506 }507 504 508 505 function format_to_edit($content, $richedit = false) { 509 506 $content = apply_filters('format_to_edit', $content); … … 575 572 576 573 function make_clickable($ret) { 577 574 $ret = ' ' . $ret . ' '; 578 $ret = preg_replace("#([\s>])(https?)://([^\s<>{}()]+[^\s.,<>{}()])#i", "$1 <a href='$2://$3' rel='nofollow'>$2://$3</a>", $ret);575 $ret = preg_replace("#([\s>])(https?)://([^\s<>{}()]+[^\s.,<>{}()])#i", "$1$2://$3", $ret); 579 576 $ret = preg_replace("#(\s)www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^ <>{}()\n\r]*[^., <>{}()\n\r]?)?)#i", "$1<a href='http://www.$2.$3$4' rel='nofollow'>www.$2.$3$4</a>", $ret); 580 577 $ret = preg_replace("#(\s)([a-z0-9\-_.]+)@([a-z0-9\-_.]+)\.([^,< \n\r]+)#i", "$1<a href=\"mailto:$2@$3.$4\">$2@$3.$4</a>", $ret); 581 578 $ret = trim($ret);