• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
          • Name-database
          • Vl-gc
          • Make-lookup-alist
          • Symbol-list-names
          • Html-encoding
            • Vl-html-encode-chars-aux
            • Vl-html-encode-push
            • Vl-html-encode-next-col
            • Vl-html-encode-string
            • Vl-distance-to-tab
            • Vl-html-encode-string-aux
            • Repeated-revappend
            • *vl-html-newline*
            • *vl-html-&quot*
            • *vl-html-&nbsp*
            • *vl-html-&lt*
            • *vl-html-&gt*
            • *vl-html-&amp*
          • Nats-from
          • Redundant-mergesort
          • Longest-common-prefix
          • Vl-edition-p
          • Nat-listp
          • Vl-plural-p
          • Vl-remove-keys
          • Sum-nats
          • Vl-maybe-nat-listp
          • Url-encoding
          • Fast-memberp
          • Vl-string-keys-p
          • Max-nats
          • Longest-common-prefix-list
          • Character-list-listp
          • Vl-string-list-values-p
          • Vl-character-list-list-values-p
          • Remove-from-alist
          • Prefix-of-eachp
          • Vl-maybe-string-listp
          • Pos-listp
          • Vl-string-values-p
          • String-list-listp
          • True-list-listp
          • Symbol-list-listp
          • Explode-list
          • All-have-len
          • Min-nats
          • Debuggable-and
          • Vl-starname
          • Remove-equal-without-guard
          • String-fix
          • Longer-than-p
          • Clean-alist
          • Anyp
          • Or*
          • Fast-alist-free-each-alist-val
          • And*
          • Not*
          • Free-list-of-fast-alists
          • *nls*
        • Loader
        • Transforms
        • Lint
        • Mlib
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Utilities

Html-encoding

Routines to encode HTML entities such as < and & into &lt;, &amp;, etc.

In principle, this conversion may not be entirely legitimate in the sense of any particular HTML specification, since ACL2 strings might contain non-printable characters or other similarly unlikely garbage. But it seems like what we implement is pretty reasonable.

We convert newline characters into the sequence <br/>#Newline. This may not be the desired behavior in certain applications, but is very convenient for what we are trying to accomplish in VL.

Subtopics

Vl-html-encode-chars-aux
Print an HTML-encoded character-list.
Vl-html-encode-push
Print the HTML encoding of a character.
Vl-html-encode-next-col
Compute where we'll be after printing a character, accounting for tab sizes and newlines.
Vl-html-encode-string
Convenient routine for HTML encoding a string.
Vl-distance-to-tab
Vl-html-encode-string-aux
Print an HTML encoded string, efficiently, without exploding it.
Repeated-revappend
*vl-html-newline*
*vl-html-&quot*
*vl-html-&nbsp*
*vl-html-&lt*
*vl-html-&gt*
*vl-html-&amp*