#15900: reverse() does not properly escape namespaced views
---------------------------+-------------------------------
 Reporter:  teolicy        |          Owner:  nobody
     Type:  Uncategorized  |         Status:  new
Milestone:                 |      Component:  Uncategorized
  Version:  1.3            |       Severity:  Normal
 Keywords:                 |   Triage Stage:  Unreviewed
Has patch:  0              |  Easy pickings:  0
---------------------------+-------------------------------
 Easier to provide an example than to explain.

 Given a freshly created django 1.3 project with urls.py as follows:
 {{{
 from django.conf.urls.defaults import patterns, include, url
 from django.contrib import admin
 admin.autodiscover()
 urlpatterns = patterns('',
     url(r'^\.admin/', include(admin.site.urls)),
 )
 }}}
 Trying to:
 {{{
 from django.core.urlresolvers import reverse
 reverse('admin:index')
 }}}
 returns: `'/%5C.admin/'`
 (the \ is escaped to be a literal \ rather than be interpreted as escaping
 the dot)

 Changing the urlpattern line to:
 {{{
 url(r'^[.]admin/', include(admin.site.urls)),
 }}}
 Does **not** help.

 As far as I could determine, this only happens for namespaced URLs.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15900>
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