urldecode the next path when pulled from cookie

pull/1/head
eric 2013-03-20 14:15:30 -04:00
parent f19cb8935b
commit 6ebdd1610d
2 changed files with 16 additions and 1 deletions

View File

@ -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 %}

View File

@ -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)