Skip to content

Commit

Permalink
Merge pull request #36 from golnazads/master
Browse files Browse the repository at this point in the history
need to url encode the bibcode only
  • Loading branch information
golnazads authored May 22, 2018
2 parents 9870dcb + f88da1b commit 86851d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resolverway/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def __init__(self, bibcode, link_type, url=None, id=None):
self.real_ip = None

def redirect(self, link):
response = redirect(urllib.quote(link), 302)
# need to urlencode the bibcode only! (ie, 1973A&A....24..337S)
link = link.replace(self.bibcode, urllib.quote(self.bibcode))
response = redirect(link, 302)
response.autocorrect_location_header = False
response.headers['user_id'] = self.user_id
return response, 302
Expand Down

0 comments on commit 86851d7

Please sign in to comment.