Navigation Menu

Skip to content

Commit

Permalink
Worked around a problem with |striptags in 1.5rc1 (already fixed in 1…
Browse files Browse the repository at this point in the history
….5.X).
  • Loading branch information
jacobian committed Feb 19, 2013
1 parent 28cfdc6 commit 8f0ff61
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions aggregator/views.py
Expand Up @@ -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.
Expand Down

0 comments on commit 8f0ff61

Please sign in to comment.