diff options
| -rw-r--r-- | quoins/controllers.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/quoins/controllers.py b/quoins/controllers.py index f627c61..1f9e971 100644 --- a/quoins/controllers.py +++ b/quoins/controllers.py | |||
| @@ -328,7 +328,10 @@ class BlogController(TGController): | |||
| 328 | if obj is None: | 328 | if obj is None: |
| 329 | u = tg.url(self.path) | 329 | u = tg.url(self.path) |
| 330 | elif isinstance(obj, basestring): | 330 | elif isinstance(obj, basestring): |
| 331 | obj = urllib.quote(obj.encode('utf8')) | 331 | try: |
| 332 | obj.encode('ascii') | ||
| 333 | except: | ||
| 334 | obj = urllib.quote(obj.encode('utf8')) | ||
| 332 | if obj.startswith('/'): obj = obj[1:] | 335 | if obj.startswith('/'): obj = obj[1:] |
| 333 | u = tg.url(os.path.join(self.path, obj)) | 336 | u = tg.url(os.path.join(self.path, obj)) |
| 334 | elif isinstance(obj, Post): | 337 | elif isinstance(obj, Post): |
