Django

Code

Changeset 5701

Show
Ignore:
Timestamp:
07/15/07 00:03:28 (1 year ago)
Author:
gwilson
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/utils/html.py

    r5609 r5701  
    5151def strip_entities(value): 
    5252    "Returns the given HTML with all entities (&something;) stripped" 
    53     return re.sub(r'&(?:\w+|#\d);', '', force_unicode(value)) 
     53    return re.sub(r'&(?:\w+|#\d+);', '', force_unicode(value)) 
    5454strip_entities = allow_lazy(strip_entities, unicode) 
    5555