From b68f188628dd7e54706cd98d4aa0a36a12adfafa Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Sun, 15 Jul 2007 05:03:28 +0000 Subject: 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 --- django/utils/html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django') 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): -- cgit v1.3