Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Worked around a problem with |striptags in 1.5rc1 (already fixed in 1…

….5.X).
  • Loading branch information...
commit 8f0ff61f7523812581a71a9001945fff28ea8d20 1 parent 28cfdc6
@jacobian jacobian authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 aggregator/views.py
View
8 aggregator/views.py
@@ -8,6 +8,14 @@
from .models import FeedItem, Feed, FeedType, APPROVED_FEED
from .forms import FeedModelForm
+# The regex used for strip_tags in 1.5rc is somewhat broken on larger strings
+# (see https://github.com/django/django/commit/20ac33) which can break the feed
+# list view (via the |striptags filter). Monkeypatching until 1.5rc2 ships, at
+# which point this grossness can be removed.
+import re
+from django.utils import html
+html.strip_tags_re = re.compile(r'<[^>]*?>', re.IGNORECASE)
+
def index(request):
"""
Displays the latest feeds of each type.
Please sign in to comment.
Something went wrong with that request. Please try again.