summaryrefslogtreecommitdiff
path: root/django/utils/html.py
diff options
context:
space:
mode:
authorGary Wilson Jr <gary.wilson@gmail.com>2007-07-15 05:03:28 +0000
committerGary Wilson Jr <gary.wilson@gmail.com>2007-07-15 05:03:28 +0000
commitb68f188628dd7e54706cd98d4aa0a36a12adfafa (patch)
tree0a9adb7dcfae8eb334e4dffc6365b31fac720e97 /django/utils/html.py
parenteff675b91eac5cf1fbfc730184bb582ce8175693 (diff)
Fixed #4310 -- Fixed a regular expression bug in `strip_entities` function and added tests for several `django.utils.html` functions. Based on patch from Brian Harring.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5701 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/html.py')
-rw-r--r--django/utils/html.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/html.py b/django/utils/html.py
index 56216b5d48..fe6881e933 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -50,7 +50,7 @@ strip_spaces_between_tags = allow_lazy(strip_spaces_between_tags, unicode)
def strip_entities(value):
"Returns the given HTML with all entities (&something;) stripped"
- return re.sub(r'&(?:\w+|#\d);', '', force_unicode(value))
+ return re.sub(r'&(?:\w+|#\d+);', '', force_unicode(value))
strip_entities = allow_lazy(strip_entities, unicode)
def fix_ampersands(value):