id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 7542,urlize changing link text as well as url,devin,devin,"The autoescaping introduced in [7079] had the unintended side-effect of appending http:// to both the link target and text instead of just the target. eg: {{{ >>> urlize('google.com') u'http://google.com' }}} Instead of the pre-[7079] behavior of: {{{ >>> urlize('google.com') u'google.com' }}} Tests weren't written until [7701], so this wasn't caught. But it popped up on our internal tests here at Disqus. Since urlize is intended just to convert text to clickable links, not change what the text says, this is undesirable. This is mostly used for user generated content, and I feel it's wrong to be changing what the user typed. I've attached a patch that fixes that problem. We need to keep a url target and a link text separate. Besides, I've cleaned up the function a bit as it got largely unreadable after [7079] and updated the docstring to include mention of autoescape and the fact that this function now converts urls ending in .org, .net and .com. As well as updating the tests included in [7701] to match this expected functionality.",,closed,Template system,dev,,fixed,,devin@…,Unreviewed,1,0,0,0,0,0