html-encode is a small Library for encoding text in various web-savvy formats. These are the functions exported from the html-encode package:

  • encode-for-pre - encodes text so it's suitable for inclusion in a HTML PRE element, or in a regular tag with HTML spacing.
  • encode-for-argument does the same thing as encode-for-pre, except it also encodes quotation marks as SGML " so they can be used in HTML element attributes.
  • encode-for-tt - attemps to encode the text so it can display in a TT element with proper spacing. The keyword argument
first-char-nbsp controls whether the first character should be rendered as a non-breaking space if it is a space in the input text.
  • encode-for-http - A highly misnamed function which does nothing of the sort. It breaks the string on the ends of tags so that long lines aren't sent.
  • ASDF-install package (obsolete)
    Try it online with this html encoder