def encode(text):
Utility method to encode text as HTML (escaping the appropriate characters). Returns the HTML encoded representation of text.
parms:
[string]