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 #200 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

[PATCH] turbogears.url() doesn't handle unicode properly

Reported by: bruno@… Owned by: anonymous
Priority: normal Milestone:
Component: TurboGears Version:
Severity: normal Keywords: url utf8 utf-8 unicode
Cc:

Description

When passing a unicode string as first arg to turbogears.url(), one get strange results like /m/y/p/a/t/h/ instead of /mypath.

The problem is in source:trunk/turbogears/__init__.py@293#L31 : we have :

if not isinstance(tgpath, str):
    tgpath = "/".join(list(tgpath))

when we should have :

if not isinstance(tgpath, basestring):
    tgpath = "/".join(list(tgpath))

Attachments

patch_urls.diff Download (473 bytes) - added by bruno@… 13 years ago.
the patch…
patch_urls.2.diff Download (474 bytes) - added by bruno@… 13 years ago.
the good patch :-/
patch_util.diff Download (495 bytes) - added by bruno@… 13 years ago.
updated for r315 (url() moved to turbogears/util.py)

Change History

Changed 13 years ago by bruno@…

the patch...

comment:1 Changed 13 years ago by anonymous

  • Summary changed from turbogears.url() doesn't handle unicode properly to [PATCH] turbogears.url() doesn't handle unicode properly

Changed 13 years ago by bruno@…

the good patch :-/

Changed 13 years ago by bruno@…

updated for r315 (url() moved to turbogears/util.py)

comment:2 Changed 13 years ago by kevin

  • Status changed from new to closed
  • Resolution set to fixed

sorry about the delay for such a trivial change! committed in [419]

Note: See TracTickets for help on using tickets.