Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

….5.X).
  • Loading branch information...
commit 8f0ff61f7523812581a71a9001945fff28ea8d20 1 parent 28cfdc6
Jacob Kaplan-Moss authored February 19, 2013

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  aggregator/views.py
8  aggregator/views.py
@@ -8,6 +8,14 @@
8 8
 from .models import FeedItem, Feed, FeedType, APPROVED_FEED
9 9
 from .forms import FeedModelForm
10 10
 
  11
+# The regex used for strip_tags in 1.5rc is somewhat broken on larger strings
  12
+# (see https://github.com/django/django/commit/20ac33) which can break the feed
  13
+# list view (via the |striptags filter). Monkeypatching until 1.5rc2 ships, at
  14
+# which point this grossness can be removed.
  15
+import re
  16
+from django.utils import html
  17
+html.strip_tags_re = re.compile(r'<[^>]*?>', re.IGNORECASE)
  18
+
11 19
 def index(request):
12 20
     """
13 21
     Displays the latest feeds of each type.

0 notes on commit 8f0ff61

Please sign in to comment.
Something went wrong with that request. Please try again.