Browse Source

Remove now-unnecessary un-escaping of ~ in urls

I had blamed Pyramid for this, but the fault was actually in Python's
stdlib. Python 3.7 fixes it, so this is no longer necessary:
https://docs.python.org/3/whatsnew/3.7.html#urllib-parse
merge-requests/53/head
Deimos 6 years ago
parent
commit
13753dd799
  1. 10
      tildes/tildes/__init__.py

10
tildes/tildes/__init__.py

@ -161,10 +161,7 @@ def current_listing_base_url(
if query:
query_vars.update(query)
url = request.current_route_url(_query=query_vars)
# Pyramid seems to %-encode tilde characters unnecessarily, fix that
return url.replace("%7E", "~")
return request.current_route_url(_query=query_vars)
def current_listing_normal_url(
@ -197,7 +194,4 @@ def current_listing_normal_url(
if query:
query_vars.update(query)
url = request.current_route_url(_query=query_vars)
# Pyramid seems to %-encode tilde characters unnecessarily, fix that
return url.replace("%7E", "~")
return request.current_route_url(_query=query_vars)
Loading…
Cancel
Save