Pull requests

#4 Open
Repository
Deleted repository
Branch
trunk (9fc1f5214945)
Repository
bbangert/WebHelpers WebHelpers
Branch
trunk

Fixed unicode params in paginate url

Author
  1. Artem Bashev
Reviewers
Description

make_page_url() uses urllib.urlencode which not expect params be unicode

a = u'работа'
a
u'\u0440\u0430\u0431\u043e\u0442\u0430'
print(a)
работа
urllib.urlencode({'key':a}, True)
'key=%3F%3F%3F%3F%3F%3F' #??????
urllib.urlencode({'key':a.encode('utf-8')}, True)
'key=%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B0' #работа

So url like /articles?tag=россия transforms into /articles?tag=????

I create this pull to fix this, even this /articles?тэг=россия now works fine.

Comments (0)