def quote(text):
text = unicode(text)<EOL>return text.translate({<EOL>ord('<STR_LIT:&>'): u'<STR_LIT>',<EOL>ord('<STR_LIT:<>'): u'<STR_LIT>',<EOL>ord('<STR_LIT:">'): u'<STR_LIT>',<EOL>ord('<STR_LIT:>>'): u'<STR_LIT>',<EOL>ord('<STR_LIT:@>'): u'<STR_LIT>',<EOL><NUM_LIT>: u'<STR_LIT>'})<EOL>
encode html entities