Skip to content

Commit

Permalink
Merge pull request #2 from liZe/patch-1
Browse files Browse the repository at this point in the history
Work-around %-encoding bug.
  • Loading branch information
SimonSapin committed Oct 1, 2012
2 parents b51a33f + 27e52a5 commit 00bca60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flask_weasyprint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def flask_url_fetcher(url):
return next_fetcher(url)
app, base_url, path = result
client = Client(app, response_wrapper=Response)
response = client.get(path, base_url=base_url)
# TODO: double-check this. Apparently Werzeug %-unquotes bytes
# but not Unicode URLs. (IRI vs. URI or something.)
response = client.get(path.encode('ascii'), base_url=base_url)
if response.status_code == 200:
return dict(
string=response.data,
Expand Down

0 comments on commit 00bca60

Please sign in to comment.