JSPX has the lovely side effect of turning:
<div class="magic"></div>
Into:
<div class="magic" />
For many browsers this causes pandemonium and mayhem with layout even though it is valid XHTML. Consequently I have resorted to using a groovy script to find all possible bad HTML with the following regex:
def m = html =~ /<(\w+)[^>]*?><\/(\w+)>/
def bad = m.findAll { it[1] == it[2] };
Is there way to have the JSPX XML processor not to self close tags?
All tags must be closed, either with the self-closing format or with a corresponding closing tag ( </MyComponent> ). Note: Every React component can be self-closing: <div /> . <div></div> is also an equivalent.
↑ The full list of valid self-closing tags in HTML5 is: area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, and wbr.
An opening tag begins a section of page content, and a closing tag ends it. For example, to markup a section of text as a paragraph, you would open the paragraph with an opening paragraph tag <p> and close it with a closing paragraph tag </p> (closing tags always proceed the element with a /).
I've been using <div><jsp:text/></div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With