This is the sanitize-html Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri May 15 11:59:21 2026 GMT+0.
The main system appears first, followed by any subsystem dependency.
sanitize-htmlOWASP-style HTML sanitization library for Common Lisp
Anthony Green <green@moxielogic.com>
MIT
0.1.0
plump (system).
lquery (system).
cl-ppcre (system).
alexandria (system).
src/package.lisp (file).
src/policies.lisp (file).
src/sanitizer.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
sanitize-html/sanitize-html.asdsanitize-html/src/package.lispsanitize-html/src/policies.lispsanitize-html/src/sanitizer.lispsanitize-html/src/policies.lispsrc/package.lisp (file).
sanitize-html (system).
*default-policy* (special variable).
*email-policy* (special variable).
*strict-policy* (special variable).
make-policy (function).
policy-allowed-attributes (reader).
(setf policy-allowed-attributes) (writer).
policy-allowed-css-properties (reader).
(setf policy-allowed-css-properties) (writer).
policy-allowed-protocols (reader).
(setf policy-allowed-protocols) (writer).
policy-allowed-tags (reader).
(setf policy-allowed-tags) (writer).
policy-escape-cdata (reader).
(setf policy-escape-cdata) (writer).
policy-remove-comments (reader).
(setf policy-remove-comments) (writer).
attribute-allowed-p (function).
copy-policy (function).
get-allowed-attributes (function).
policy (structure).
policy-p (function).
protocol-allowed-p (function).
tag-allowed-p (function).
sanitize-html/src/sanitizer.lispsrc/policies.lisp (file).
sanitize-html (system).
safe-url-p (function).
sanitize (function).
sanitize-html (function).
sanitize-url (function).
remove-element-keep-children (function).
remove-event-handlers (function).
sanitize-attributes (function).
sanitize-css (function).
sanitize-node (generic function).
sanitize-style-attribute (function).
sanitize-url-attribute (function).
set-safe-defaults (function).
Packages are listed by definition order.
sanitize-htmlOWASP-style HTML sanitization library for Common Lisp
common-lisp.
*default-policy* (special variable).
*email-policy* (special variable).
*strict-policy* (special variable).
make-policy (function).
policy-allowed-attributes (reader).
(setf policy-allowed-attributes) (writer).
policy-allowed-css-properties (reader).
(setf policy-allowed-css-properties) (writer).
policy-allowed-protocols (reader).
(setf policy-allowed-protocols) (writer).
policy-allowed-tags (reader).
(setf policy-allowed-tags) (writer).
policy-escape-cdata (reader).
(setf policy-escape-cdata) (writer).
policy-remove-comments (reader).
(setf policy-remove-comments) (writer).
safe-url-p (function).
sanitize (function).
sanitize-html (function).
sanitize-url (function).
attribute-allowed-p (function).
copy-policy (function).
get-allowed-attributes (function).
policy (structure).
policy-p (function).
protocol-allowed-p (function).
remove-element-keep-children (function).
remove-event-handlers (function).
sanitize-attributes (function).
sanitize-css (function).
sanitize-node (generic function).
sanitize-style-attribute (function).
sanitize-url-attribute (function).
set-safe-defaults (function).
tag-allowed-p (function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Default sanitization policy - balanced for general content
Email policy - allows common email HTML formatting
Strict policy - minimal allowed HTML
Check if URL is safe according to POLICY
Alias for SANITIZE-HTML
Sanitize HTML-STRING according to POLICY. Returns sanitized HTML string. This is the main entry point for HTML sanitization.
Return URL if safe, nil otherwise
Check if ATTR-NAME is allowed for TAG-NAME by POLICY
Get list of allowed attributes for TAG-NAME according to POLICY
Check if URL uses an allowed protocol according to POLICY
Remove ELEMENT but keep its children in the same position
Remove all event handler attributes (onclick, onload, etc.)
Remove disallowed attributes from ELEMENT according to POLICY
Sanitize CSS string, keeping only allowed properties
Sanitize inline CSS in style attribute
Sanitize URL in attribute ATTR-NAME of ELEMENT
Set safe default attributes on certain elements
Check if TAG-NAME is allowed by POLICY
Sanitize a Plump DOM node according to policy
Default case for unknown node types - remove them
cdata) policy) ¶Handle CDATA sections based on policy
comment) policy) ¶Remove or keep comment nodes based on policy
text-node) policy) ¶Text nodes are always safe, no action needed
element) policy) ¶Sanitize an HTML element node
root) policy) ¶Sanitize all children of root node
Sanitization policy defining what HTML elements, attributes, and protocols are allowed
structure-object.
list
list
list
(quote ("http" "https" "mailto"))
list
boolean
t
boolean
t
| Jump to: | (
A C F G M P R S T |
|---|
| Jump to: | (
A C F G M P R S T |
|---|
| Jump to: | *
A E R S |
|---|
| Jump to: | *
A E R S |
|---|
| Jump to: | F P S |
|---|
| Jump to: | F P S |
|---|