#3553: urlpatterns uses urllib.quote/unquote should use 
urllib.quote/unquote_plus
-----------------------------------+----------------------------------------
Reporter:  [EMAIL PROTECTED]  |       Owner:  jacob        
  Status:  new                     |   Component:  Uncategorized
 Version:  0.95                    |    Keywords:               
   Stage:  Unreviewed              |   Has_patch:  0            
-----------------------------------+----------------------------------------
 When using the + character to represent spaces in urls it is impossible to
 differentiate between a literal + and an escaped %2B in the url.
 
 Example
 {{{
 urlpatterns = (r'/search/(?<query>.*)$,app.search)
 }}}
 
 {{{
 def search(request, query):
   print "query: "+query
 }}}
 
 
 
 Observed
 
 Visiting  http://example.com/search/foo%2B+bar  causes django to print
 foo++bar
 
 
 Expected
 
 Visitin http://example.com/search/foo%2B+bar should cause django to print
 foo+ bar
 
 
 Solution
 
 I assume that django is using urllib.quote/unqoute   Changing it to use
 urllib.quote_plus and urllib.unqoute_plus would produce the expected
 behavior and not have any side affects

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3553>
Django Code <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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to