Namespace: joker.html
v1.0Contents
Summary
Escapes and unescapes HTML text entities.
Index
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.-
(None.)
Variables
-
(None.)
Functions, Macros, and Special Forms
-
escape
Function v1.0(escape s)Escapes HTML-sensitive characters in s.
Replaces only <, >, &, ', and " with their HTML entity forms, matching Go's
html.EscapeString behavior.
Example:
(joker.html/escape "<a href='x'>&")
;; => "<a href='x'>&" -
unescape
Function v1.0(unescape s)Unescapes HTML entities in s.
Recognizes named and numeric entities using Go's html.UnescapeString rules.
Text that is not part of a valid entity is preserved.
Example:
(joker.html/unescape "Tom & Jerry")
;; => "Tom & Jerry"