def strip_entities(value):
 return re.sub('&(?:\\w+|#\\d);', '', value)

def strip_entities ( value ) : return re . sub ( '&(?:\\w+|#\\d);' , '' , value )
returns the given html with all entities stripped .