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