Ticket #8123: utils-spaceless.diff
File utils-spaceless.diff, 658 bytes (added by , 16 years ago) |
---|
-
django/utils/html.py
59 59 60 60 def strip_spaces_between_tags(value): 61 61 """Returns the given HTML with spaces between tags removed.""" 62 return re.sub(r'>\s+<', '><', force_unicode(value)) 62 value = re.sub(r'>\s+<', '> <', force_unicode(value)) 63 value = re.sub(r'([^(em|strong|a)])>\s+<', r'\1><', value) 64 return re.sub(r'>\s+<([^(em|strong|a)])', r'><\1', value) 63 65 strip_spaces_between_tags = allow_lazy(strip_spaces_between_tags, unicode) 64 66 65 67 def strip_entities(value):