def unescape(text):
 rv = ''
 i = 0
 while (i < len(text)):
  if (((i + 1) < len(text)) and (text[i] == '\\')):
   rv += text[(i + 1)]
   i += 1
  else:
   rv += text[i]
  i += 1
 return rv

def unescape ( text ) : rv = '' i = 0 while ( i < len ( text ) ) : if ( ( ( i + 1 ) < len ( text ) ) and ( text [ i ] == '\\' ) ) : rv += text [ ( i + 1 ) ] i += 1 else : rv += text [ i ] i += 1 return rv
removes html or xml character references and entities from a text string .