From 62b07fcc8ea485f1c44581a44ee57cc833ea396c Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 4 Nov 2014 15:04:07 +0200 Subject: [PATCH] handle unicode usernames/titles --- pandora/text/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/text/models.py b/pandora/text/models.py index bd5c5b84e..dd730f0cd 100644 --- a/pandora/text/models.py +++ b/pandora/text/models.py @@ -66,7 +66,7 @@ class Text(models.Model): return cls.objects.get(user__username=username, name=name) def get_absolute_url(self): - return '/texts/%s' % quote(self.get_id().replace('_', '\t').replace(' ', '_')).replace('/', '%2F') + return '/texts/%s' % quote(self.get_id().replace('_', '\t').replace(' ', '_').encode('utf-8')).replace('/', '%2F') def get_absolute_pdf_url(self): return '%s/text.pdf' % self.get_absolute_url()