def escape_cell(cell):
 cell = cell.replace(u'\\', u'\\\\')
 cell = cell.replace(u'\n', u'\\n')
 cell = cell.replace(u'|', u'\\|')
 return cell

def escape_cell ( cell ) : cell = cell . replace ( u'\\' , u'\\\\' ) cell = cell . replace ( u'\n' , u'\\n' ) cell = cell . replace ( u'|' , u'\\|' ) return cell
escape table cell contents .