[FIX] http: replace forward-ported urlparse with werkzeug.urls
Introduced by forward-port ofeaa3682bb6ated2ddeccdf. At01e3514147urlparse was replaced with werkzeug.urls.
This commit is contained in:
+1
-1
@@ -162,7 +162,7 @@ def redirect_with_hash(url, code=303):
|
||||
# See extensive test page at http://greenbytes.de/tech/tc/httpredirects/
|
||||
if request.httprequest.user_agent.browser in ('firefox',):
|
||||
return werkzeug.utils.redirect(url, code)
|
||||
if urlparse.urlparse(url, scheme='http').scheme not in ('http', 'https'):
|
||||
if urls.url_parse(url, scheme='http').scheme not in ('http', 'https'):
|
||||
url = 'http://' + url
|
||||
url = url.replace("'", "%27").replace("<", "%3C")
|
||||
return "<html><head><script>window.location = '%s' + location.hash;</script></head></html>" % url
|
||||
|
||||
Reference in New Issue
Block a user