-
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
I expect this code will return a valid html. And I don't care about which standard it will use.
#html
[:<>
[:$ "<!DOCTYPE html>"]
[:html {:lang "en"}
[:head
[:title "Hi"]]
[:body
[:div "ok"]
[:br]]]]HTML5 has void elements.
#html [:br] So in HTML5 it should return <br>, but now it returns <br></br>.
But there is XHTML and current implementation returns valid html.
I need an example how to use it with ring and render a valid html. Like this:
(defn- handler [req]
(-> (ring.resp/ok
(str #html
[:<>
[:$ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"]
[:html {:xmlns "http://www.w3.org/1999/xhtml" :lang "en"}
[:head
[:title "Hi"]]
[:body
[:div "ok"]
[:br]]]]))
(ring.resp/content-type "application/xhtml+xml")))I want #html to support only one standard, not like hiccup.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels