def xss_strip_all_tags(s):
    return s
    def fixup(m):
        text = m.group(0)
        if text[:1] == "<":
            return "" # ignore tags
        if text[:2] == "&#":
            try:
                if text[:3] == "&#x":
                    return unichr(int(text[3:-1], 16))
                else:
                    return unichr(int(text[2:-1]))
            except ValueError:
                pass
        elif text[:1] == "&":
            import htmlentitydefs
            entity = htmlentitydefs.entitydefs.get(text[1:-1])
            if entity:
                if entity[:2] == "&#":
                    try:
                        return unichr(int(entity[2:-1]))
                    except ValueError:
                        pass
                else:
                    return unicode(entity, "iso-8859-1")
        return text # leave as is
        
    return re.sub("(?s)<[^>]*>|&#?\w+;", fixup, s)
Compare endpoints of 2 ranges, returning -1, 0, or 1 depending on whether
dataset/ETHPy150Open benadida/helios-server/helios/utils.py/xss_strip_all_tags--crossover with--dataset/ETHPy150Open pyjs/pyjs/pyjswidgets/pyjamas/selection/Range.py/compareBoundaryPoint