[wp-trac] Re: [WordPress Trac] #2889: duplicate content when submitting comments

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 5 12:13:58 GMT 2006


#2889: duplicate content when submitting comments
---------------------+------------------------------------------------------
 Reporter:  whooami  |        Owner:  anonymous
     Type:  defect   |       Status:  new      
 Priority:  high     |    Milestone:  2.0.4    
Component:  General  |      Version:  2.0.3    
 Severity:  normal   |   Resolution:           
 Keywords:           |  
---------------------+------------------------------------------------------
Changes (by ptvguy):

  * milestone:  => 2.0.4

Comment:

 Try this (sans mod):

 {{{
 function make_clickable($ret) {
 }}}
 {{{
         $ret = ' ' . $ret . ' ';
 }}}
 {{{
         $ret =
 preg_replace("#([\s>])(https?)://([^\s<>{}()]+[^\s.,<>{}()])#i",
 "$1$2://$3", $ret);
 }}}
 {{{
         $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);
 }}}
 {{{
         $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);
 }}}
 {{{
         $ret = trim($ret);
 }}}
 {{{
         return $ret;
 }}}
 {{{
 }
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2889>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list