code: def html_encode(text):
      
      text = text.replace('&', '&amp;')
      text = text.replace('<', '&lt;')
      text = text.replace('>', '&gt;')
      text = text.replace('"', '&quot;')
      return text
docs: Encode characters with a special meaning as HTML.
  
      :param text: The plain text (a string).
      :returns: The text converted to HTML (a string).