From 6d226eabe885ccd221437e64dab4f6ec4af15fda Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 20 Nov 2020 11:21:43 +0100 Subject: [PATCH] urlencode Unicode urls on redirect --- openlibrary/plugins/upstream/addbook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlibrary/plugins/upstream/addbook.py b/openlibrary/plugins/upstream/addbook.py index 30eeedd228d..797593fa807 100644 --- a/openlibrary/plugins/upstream/addbook.py +++ b/openlibrary/plugins/upstream/addbook.py @@ -782,7 +782,7 @@ def POST(self, key): else: add_flash_message("info", utils.get_message("flash_book_updated")) - raise web.seeother(edition.url()) + raise web.seeother(urllib.parse.quote(edition.url())) except ClientException as e: add_flash_message('error', e.args[-1] or e.json) return self.GET(key)