#9655: urlize should not quote already quoted urls.
---------------------------------------------+------------------------------
          Reporter:  flytwokites             |         Owner:  nobody
            Status:  reopened                |     Milestone:        
         Component:  Template system         |       Version:  1.0   
        Resolution:                          |      Keywords:  urlize
             Stage:  Design decision needed  |     Has_patch:  0     
        Needs_docs:  0                       |   Needs_tests:  0     
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Comment (by ptarjan):

 bad formatting, sorry

 {{{
 from django import template
 from django.utils.safestring import mark_safe
 import urllib
 register = template.Library()

 @register.filter(name="myurlize")
 def myurlize(url) :
     r = '<a href="%s">%s</a>' % (url, urllib.unquote(url))
     return mark_safe(r)
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9655#comment:9>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to