]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/utils/pagination.py
Fix in the retag template.
[osqa.git] / forum / utils / pagination.py
index fb99244c7d4190933309ac9134c8a07bdccaa314..f607cd0406bcbc676590a0df16d2b533cd003b62 100644 (file)
@@ -210,8 +210,8 @@ def _paginated(request, objects, context):
     def get_page():
         object_list = page_obj.object_list
 
-        if hasattr(object_list, 'lazy'):
-            return object_list.lazy()
+        #if hasattr(object_list, 'lazy'):
+        #    return object_list.lazy()
         return object_list
     paginator.page = get_page()
 
@@ -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)])