Commits

Anonymous committed 00fd210

Same fix for redirect_back()

Comments (0)

Files changed (1)

zine/utils/http.py

     target = get_redirect_target()
     if target is None:
         target = url_for(*args, **kwargs)
-    return redirect(target)
+    # call werkzeug's redirect directly and not the redirect() function
+    # from this module because it will strip leading slashes this function
+    # returns and thus generate wrong redirects.
+    return _redirect(target)
 
 
 class RequestLocal(object):