Html-encoding
Routines to encode HTML entities, e.g., < becomes <.
In principle, our conversion routines may not be entirely
legitimate in the sense of some precise HTML specification, because we do not
account for non-printable characters or other similarly unlikely garbage in the
input. But it seems like what we implement is pretty reasonable, and handles
most ordinary characters.
Note that we convert #\Newline characters into the sequence
<br/>#\Newline. This may not be the desired behavior in certain
applications, but seems basically reasonable for converting plain text into
HTML.
Subtopics
- Html-encode-string-aux
- Core of converting strings into HTML, output to an accumulator.
- Html-encode-chars-aux
- Convert a character list into HTML. Outputs to an accumulator.
Tracks the column number to handle tab characters.
- Html-encode-push
- HTML encode a single character, with column/tabsize support.
- Html-encode-string-basic-aux
- Convert a string into HTML (simple version, no tab support).
- Html-encode-string
- (html-encode-string x tabsize) converts the string x into HTML, and
returns the result as a new string. Tracks the column number to handle tab
characters.
- Html-encode-char-basic
- HTML encode a single character (simple version, no tab support).
- Html-encode-chars-basic-aux
- Convert a character list into HTML (simple version, no column/tabsize support).
- Html-encode-string-basic
- Convert a string into HTML (simple version, no tab support).