parameters: (text)
return_statement: return text
docstring: Encodes `text` for raw use in HTML.
      
          >>> htmlquote("<'&\\">")
          '&lt;&#39;&amp;&quot;&gt;'
docstring_summary: Encodes `text` for raw use in HTML.
      
          >>> htmlquote("<'&\\">")
          '&lt;&#39;&amp;&quot;&gt;'
docstring_tokens: Encodes text for raw use in HTML . >>> htmlquote ( < & \\ > ) &lt ; &#39 ; &amp ; &quot ; &gt ;
function: def htmlquote(text):
      """
      Encodes `text` for raw use in HTML.
      
          >>> htmlquote("<'&\\">")
          '&lt;&#39;&amp;&quot;&gt;'
      """
      text = text.replace("&", "&amp;") # Must be done first!
      text = text.replace("<", "&lt;")
      text = text.replace(">", "&gt;")
      text = text.replace("'", "&#39;")
      text = text.replace('"', "&quot;")
      return text
function_tokens: def htmlquote ( text ) : text = text . replace ( "&" , "&amp;" ) # Must be done first! text = text . replace ( "<" , "&lt;" ) text = text . replace ( ">" , "&gt;" ) text = text . replace ( "'" , "&#39;" ) text = text . replace ( '"' , "&quot;" ) return text