Closed petterik closed 7 years ago
Applied #819 and it works!
(dom/render-to-str (dom/script {:type "text/javascript" :dangerouslySetInnerHTML {:__html "'foo'"}}))
=>
"<script type=\"text/javascript\" data-reactroot=\"\" data-reactid=\"1\" data-react-checksum=\"-1726473186\">'foo'</script>"
When doing server side rendering of a script tag with an inline script, the contents of the inline script becomes escaped and thus broken:
To work around this we tried using the
dangerouslySetInnerHTML
attribute:Seems like the
dangerouslySetInnerHTML
is not handled byom.dom
?