I'm encountering a problem where React.js is omitting closing tags for elements which don't require them in html (but do require them in XML) such as <input>
For example (jsfiddle: http://jsfiddle.net/hc4hs9on/)
console.log(React.renderComponentToString(<input></input>));
will output
<input data-reactid=".0" data-react-checksum="1975453773">
Which throws an error DOMException: Failed to set the 'innerHTML' property on 'Element': The provided markup is invalid XML, and therefore cannot be inserted into an XML document. if you try to render the component.
How do I tell react that I want it to send me correct markup?
When possible, React DOM now generates XHTML-compatible markup.