Warning:
Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.
Ticket #1862: tg-1.0-url_encoding.patch
| File tg-1.0-url_encoding.patch,
821 bytes
(added by wmark, 4 years ago) |
|
|
-
|
old
|
new
|
|
| 528 | 528 | tgparams.update(kw) |
| 529 | 529 | except AttributeError: |
| 530 | 530 | raise TypeError('url() expects a dictionary for query parameters') |
| 531 | | args = [] |
| | 531 | args = dict() |
| 532 | 532 | for key, value in tgparams.iteritems(): |
| 533 | 533 | if value is None: |
| 534 | 534 | continue |
| … |
… |
|
| 541 | 541 | continue |
| 542 | 542 | if isinstance(v, unicode): |
| 543 | 543 | v = v.encode("utf8") |
| 544 | | args.append("%s=%s" % (k, urllib.quote(str(v)))) |
| | 544 | args[k] = v |
| 545 | 545 | if args: |
| 546 | | result += "?" + "&".join(args) |
| | 546 | result += (('?' in result) and '&' or '?') + urllib.urlencode(args, True) |
| 547 | 547 | return result |
| 548 | 548 | |
| 549 | 549 | def check_app_root(): |
Download in other formats: