from django import template
from django.core.paginator import Paginator, EmptyPage
from django.utils.translation import ugettext as _
+from django.utils.html import escape
from django.http import Http404
from django.utils.http import urlquote
from django.utils.safestring import mark_safe
for k, l in querydict.iterlists():
if (not exclude) or (not k in exclude):
- all += ["%s=%s" % (k, urlquote(strip_tags(v))) for v in l]
+ all += ["%s=%s" % (k, escape(strip_tags(v))) for v in l]
return "&".join(all)
#answer_description = _("answers")
if not feed_url:
- req_params = "&".join(generate_uri(request.GET, (_('page'), _('pagesize'), _('sort'))))
+ req_params = generate_uri(request.GET, (_('page'), _('pagesize'), _('sort')))
if req_params:
req_params = '&' + req_params
- feed_url = mark_safe(escape(request.path + "?type=rss" + req_params))
+ feed_url = request.path + "?type=rss" + req_params
return pagination.paginated(request, ('questions', paginator_context or QuestionListPaginatorContext()), {
"questions" : questions.distinct(),