mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #1227 -- Fixed problem with new {% spaceless %} tag. It now normalizes spaces to a single space rather than no spaces
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -38,8 +38,8 @@ def strip_tags(value):
|
||||
return re.sub(r'<[^>]*?>', '', value)
|
||||
|
||||
def strip_spaces_between_tags(value):
|
||||
"Returns the given HTML with spaces between tags stripped"
|
||||
return re.sub(r'>\s+<', '><', value)
|
||||
"Returns the given HTML with spaces between tags normalized to a single space"
|
||||
return re.sub(r'>\s+<', '> <', value)
|
||||
|
||||
def strip_entities(value):
|
||||
"Returns the given HTML with all entities (&something;) stripped"
|
||||
|
||||
Reference in New Issue
Block a user