[wp-trac] Re: [WordPress Trac] #2889: duplicate content when
submitting comments
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 5 13:28:17 GMT 2006
#2889: duplicate content when submitting comments
---------------------------------------------------------------------+------
Reporter: whooami | Owner: anonymous
Type: defect | Status: closed
Priority: high | Milestone: 2.0.4
Component: General | Version: 2.0.3
Severity: normal | Resolution: fixed
Keywords: comment, function, anchor, make_clickable, bg|has_patch |
---------------------------------------------------------------------+------
Changes (by whooami):
* resolution: => fixed
* status: new => closed
Comment:
Ive fixed it the way it SHOULD be fixed:
bare urls work.
here is the complete function:
{{{
function make_clickable($ret) {
$ret = ' ' . $ret;
$ret = preg_replace("#(^|[\n
])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "$1<a href='$2'
rel='nofollow'>$2</a>", $ret); //fix
$ret = preg_replace("#(^|[\n
])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "$1<a href='http://$2'
rel='nofollow'>$2</a>", $ret); //fix
$ret = preg_replace("#(\s)([a-z0-9\-_.]+)@([^,< \n\r]+)#i", "$1<a
href=\"mailto:$2@$3\">$2@$3</a>", $ret);
$ret = substr($ret, 1);
$ret = trim($ret);
return $ret;
}
}}}
You're all welcome.
--
Ticket URL: <http://trac.wordpress.org/ticket/2889>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list