Not built-in, as far as I know, and seems too terrible for its creation. My decision:
(require '[net.cgrand.enlive-html :as html])
(def my-node '{:tag :p,
:content ("And, in a lower voice, \"Is this"
{:tag :em, :attrs nil, :content ("common")} "?\"")})
;; for escaped string:
(apply str (html/emit* (:content my-node)))
=> "And, in a lower voice, \"Is this<em>common</em>?\""
;; print in human readable form
(print (apply str (html/emit* (:content my-node))))
=> And, in a lower voice, "Is this<em>common</em>?"
nil
source
share