def unescape_string(escaped_text):
    unescaped = escaped_text
    try:
        unescaped = HTMLParser.HTMLParser().unescape(escaped_text)
        # replace most common HTML data
        unescaped = unescaped.replace('<br>', '\n')
        unescaped = unescaped.replace('<br/>', '\n')
        unescaped = unescaped.replace('<br />', '\n')
        unescaped = unescaped.decode('string_escape')
    except:
        #
        # If there were errors here, just ignore them and try to give back
        # the string the best it could do
        #
        pass
    return unescaped
Unescape strings. This is useful for cases when data that needs to be
dataset/ETHPy150Open brunobraga/termsaver/termsaverlib/common.py/unescape_string