#NEWLINE# def unescape( data , entities = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# 'Unescape &amp;, &lt;, and &gt; in a string of data.\n\n    You can unescape other strings of data by passing a dictionary as\n    the optional entities parameter.  The keys and values must all be\n    strings; each key will be replaced with its corresponding value.\n    ' #NEWLINE# data = data . replace ( '&lt;' , '<' ) #NEWLINE# data = data . replace ( '&gt;' , '>' ) #NEWLINE# if entities : #NEWLINE# #INDENT# data = __dict_replace ( data , entities ) #NEWLINE# #UNINDENT# return data . replace ( '&amp;' , '&' )