[wp-trac] [WordPress Trac] #10990: Include trailing ) in make_clickable if it is part of the URL

WordPress Trac wp-trac at lists.automattic.com
Wed Oct 21 06:42:55 UTC 2009


#10990: Include trailing ) in make_clickable if it is part of the URL
--------------------------+-------------------------------------------------
 Reporter:  josephscott   |       Owner:  azaozz   
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  2.9      
Component:  Formatting    |     Version:  2.8.4    
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by westi):

 I've added test cases for this to wordpress-tests.
 Inputs:
 {{{
 'http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)',
 '(http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software))',
 }}}

 Outputs:
 {{{
 '<a href="http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)"
 rel="nofollow">http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)</a>',
 '(<a href="http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)"
 rel="nofollow">http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)</a>)',
 }}}

 The first passes with this patch applied.  The second doesn't you get the
 following output:

 {{{
 (<a href="http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software"
 rel="nofollow">http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software</a>))
 }}}

 It also causes the following test to fail with the trailing period
 incorrectly in the url and link.
 {{{
 There was a spoon named http://wordpress.org.
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10990#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list