import re


def strip_spaces_between_tags(value):
    """
    Stolen from `django.util.html`
    Returns the given HTML with spaces between tags removed.
    """
    return re.sub(r'>\s+<', '><', str(value))