From 24da082f86cbb6dae0d55f66c42e4e2c55ac66d1 Mon Sep 17 00:00:00 2001 From: jordan Date: Mon, 18 Apr 2011 16:53:39 +0000 Subject: [PATCH] escape the base path when building the pagination URLs git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@987 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- forum/utils/pagination.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forum/utils/pagination.py b/forum/utils/pagination.py index 382e59e..f607cd0 100644 --- a/forum/utils/pagination.py +++ b/forum/utils/pagination.py @@ -240,9 +240,9 @@ def _paginated(request, objects, context): page_numbers = [] if sort: - url_builder = lambda n: mark_safe("%s%s%s=%s&%s=%s" % (base_path, url_joiner, context.SORT, sort, context.PAGE, n)) + url_builder = lambda n: mark_safe("%s%s%s=%s&%s=%s" % (escape(base_path), url_joiner, context.SORT, sort, context.PAGE, n)) else: - url_builder = lambda n: mark_safe("%s%s%s=%s" % (base_path, url_joiner, context.PAGE, n)) + url_builder = lambda n: mark_safe("%s%s%s=%s" % (escape(base_path), url_joiner, context.PAGE, n)) if range_start > (context.outside_page_range + 1): page_numbers.append([(n, url_builder(n)) for n in range(1, context.outside_page_range + 1)]) -- 2.39.5