[wp-trac] Re: [WordPress Trac] #8300: Add parentheses to the list of valid URL characters for make_clickable function

WordPress Trac wp-trac at lists.automattic.com
Fri Nov 21 19:27:16 GMT 2008


#8300: Add parentheses to the list of valid URL characters for make_clickable
function
-------------------------+--------------------------------------------------
 Reporter:  josephscott  |        Owner:  anonymous
     Type:  defect       |       Status:  new      
 Priority:  normal       |    Milestone:  2.8      
Component:  General      |      Version:  2.7      
 Severity:  normal       |   Resolution:           
 Keywords:  has-patch    |  
-------------------------+--------------------------------------------------
Comment (by filosofo):

 Actually, you can do this without having to modify
 {{{_make_url_clickable_cb}}}: just change the regex to capture a closing
 parenthesis at the end of the URL only if the entire URL is not preceded
 by an opening parenthesis.

 {{{make_clickable_parenthesis.diff}}} gets all of the following examples
 right:
 {{{
 http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)
 http://msdn.microsoft.com/en-us/library/aa752574(VS.85).aspx
 My site (http://josephscott.org)
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8300#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list