urldecode the next path when pulled from cookie
parent
f19cb8935b
commit
6ebdd1610d
|
@ -1,4 +1,5 @@
|
|||
{% extends "registration/registration_base.html" %}
|
||||
{% load urldecode %}
|
||||
{% block title %}Activation email sent{% endblock %}
|
||||
{% block doccontent %}
|
||||
{% if not user.is_authenticated %}
|
||||
|
@ -9,7 +10,7 @@ An account activation email has been sent. Please check your email and click on
|
|||
{% if request.COOKIES.next %}
|
||||
|
||||
<p>
|
||||
You can also go back to <a href="{{ request.COOKIES.next }}">the page where you were</a>.
|
||||
You can also go back to <a href="{{ request.COOKIES.next|urldecode }}">the page where you were</a>.
|
||||
</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
"""
|
||||
{{ raw|urldecode }}
|
||||
"""
|
||||
from django.template.defaultfilters import stringfilter
|
||||
from django.template.base import Library
|
||||
from urllib import unquote
|
||||
|
||||
register = Library()
|
||||
|
||||
@register.filter()
|
||||
@stringfilter
|
||||
def urldecode(value):
|
||||
return unquote(value)
|
||||
|
Loading…
Reference in New Issue