According to the changelog this was added in 1.0.6 in order to address 
bug#1862.

I was wondering if the calling of urllib.urlencode() could be controlled 
via a configuration file setting?

Reason is this produced a negative side effect for me (upgrading from 
1.0.4), in that I have a web based file browser, and I pass a path 
variable to it like:
<webroot>:8080/?path=/dir/subdir1/subdir2

calling urlencode() on this produces:
<webroot>:8080/?path=%2Fdir%2Fsubdir1%2Fsubdir2

which means that it isn't as readable, or copy/pastable to my users. I 
already patched my controllers.py file to revert to the previous behavior.
--------------------
--- /users/dgardner/tars/TurboGears-1.0.7/turbogears/controllers.py    
2008-09-15 13:30:30.000000000 -0700
+++ controllers.py    2008-11-05 14:23:00.061899890 -0800
@@ -557,11 +557,9 @@
                 v = v.encode('utf8')
             args.append((k, str(v)))
     if args:
-        query_string = urllib.urlencode(args, True)
-        if '?' in tgpath:
-            tgpath += '&' + query_string
-        else:
-            tgpath += '?' + query_string
+        # use tg1.0.4 behavior
+        tgpath += "?" + "&".join(["%s=%s"%(k,v) for k,v in args])
+
     return tgpath


-- 
David Gardner
Pipeline Tools Programmer, "Sid the Science Kid"
Jim Henson Creature Shop
[EMAIL PROTECTED]



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to