So I have this code in my current project:
<body>
<p>unicorns ftw</p>
</body>
$("body")
.append("<span>").text("unicorn sucks")
.append("<div>")
.html("</sarcasm>");
As the W3C Recommendation stated, if an unexpected </sarcasm>
is found in the HTML, the browser should "take a deep breath, then act as described in the 'any other end tag'." But when I run this code, my browser (Chrome 34) is only acting as described in the "any other end tag"! I believe this is a bug in Chrome, but when I tested it in Firefox, it is also not taking a deep breath as expected.
Is there any way to work around this bug? Any solution is welcomed.