Add non-escaping-tag group
This commit is contained in:
parent
7ec66d0da5
commit
6d894ed9a1
2 changed files with 9 additions and 3 deletions
|
@ -4,7 +4,8 @@
|
|||
#:escape-html-attribute
|
||||
#:escape-html-text-content)
|
||||
(:import-from #:hsx/group
|
||||
#:self-closing-tag-p)
|
||||
#:self-closing-tag-p
|
||||
#:non-escaping-tag-p)
|
||||
(:export #:element
|
||||
#:tag
|
||||
#:html-tag
|
||||
|
@ -80,7 +81,8 @@
|
|||
type-str
|
||||
(props->string props)
|
||||
(mapcar (lambda (child)
|
||||
(if (stringp child)
|
||||
(if (and (not (non-escaping-tag-p type))
|
||||
(stringp child))
|
||||
(escape-html-text-content child)
|
||||
child))
|
||||
children)
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
#:make-keyword
|
||||
#:symbolicate)
|
||||
(:export #:defgroup
|
||||
#:self-closing-tag-p))
|
||||
#:self-closing-tag-p
|
||||
#:non-escaping-tag-p))
|
||||
(in-package #:hsx/group)
|
||||
|
||||
(defun make-keyword-hash-table (symbols)
|
||||
|
@ -24,3 +25,6 @@
|
|||
(defgroup self-closing-tag
|
||||
area base br col embed hr img input keygen
|
||||
link meta param source track wbr)
|
||||
|
||||
(defgroup non-escaping-tag
|
||||
script style)
|
||||
|
|
Loading…
Reference in a new issue