- Code: Select all
<script type="text/javascript">
var code1 = '<body><script>for (var i=0;i<399;i++) {document.write(i+"<br>");};</script></body>';
var code2 = '<body><script>for (var i=0;i<399;i++) {document.write(i+"<br>");};<\/script></body>';
</script>
WeBuilder will highlight the 2nd line in red, indicating an error. But the code IS valid, and adding an escape character before the "/script" is the correct way to prevent the HTML parser from recognizing it as a tag.