diff --git a/src/element.lisp b/src/element.lisp index bebe50a..680b38f 100644 --- a/src/element.lisp +++ b/src/element.lisp @@ -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) diff --git a/src/group.lisp b/src/group.lisp index 7b058fe..8d580f0 100644 --- a/src/group.lisp +++ b/src/group.lisp @@ -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)