mirror of
https://github.com/django/django.git
synced 2025-09-17 16:05:54 +00:00
Fixed #3532 -- Made spaceless template tag remove all spaces, rather than preserving a single space. Thanks for the suggestion, ampaze@gmx.net.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
1109e722aa
commit
9191fa1f64
4 changed files with 9 additions and 9 deletions
|
@ -39,8 +39,8 @@ def strip_tags(value):
|
|||
return re.sub(r'<[^>]*?>', '', value)
|
||||
|
||||
def strip_spaces_between_tags(value):
|
||||
"Returns the given HTML with spaces between tags normalized to a single space"
|
||||
return re.sub(r'>\s+<', '> <', value)
|
||||
"Returns the given HTML with spaces between tags removed"
|
||||
return re.sub(r'>\s+<', '><', value)
|
||||
|
||||
def strip_entities(value):
|
||||
"Returns the given HTML with all entities (&something;) stripped"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue