def fix_ampersands(value):
 return unencoded_ampersands_re.sub('&amp;', force_unicode(value))

def fix_ampersands ( value ) : return unencoded_ampersands_re . sub ( '&amp;' , force_unicode ( value ) )
replaces ampersands with &amp; entities .