Most browsers seem to have problems with code like this:
var foo = "</script>";
In Firefox, Opera and IE8 this results in an unterminated string literal error. Can be pretty nasty when serializing html code which includes scripts.
More Related Contents:
- How can I debug my JavaScript code? [closed]
- Chrome/Firefox console.log always appends a line saying ‘undefined’
- How to quickly and conveniently disable all console.log statements in my code?
- Why is console.log() considered better than alert()?
- Breakpoint on property change
- How to set a JavaScript breakpoint from code in Chrome?
- What do {curly braces} around javascript variable name mean [duplicate]
- On Text Highlight Event?
- JavaScript: Is there a way to get Chrome to break on all errors?
- Can a site invoke a browser extension?
- Intercept calls to console.log in Chrome
- How to show full object in Chrome console
- Parsing JSON from XmlHttpRequest.responseJSON
- Inspecting WebSocket frames in an undetectable way
- console.log.apply not working in IE9
- Is there something like “Firebug for IE” (for debugging JavaScript)?
- How I can make a browser action button that looks and acts like a toggle
- How to go about debugging JavaScript in the HtmlService in Google Scripts
- TypeError: [API] is undefined in content script or Why can’t I do this in a content script?
- Firefox extension custom fonts
- Detect failure to load contents of an iframe
- Chrome debugging – break on next click event
- Is it possible to change javascript variable values while debugging in Google Chrome?
- JavaScript Troubleshooting Tools in Internet Explorer
- Alternative to DOMNodeInserted
- JavaScript: How do I print a message to the error console?
- How can I fix WebStorm warning “Unresolved function or method” for “require” (Firefox Add-on SDK)
- Find what javascript changes the DOM?
- How do I find which JavaScript is changing an element’s style?
- Chrome developer tools do not show all JavaScript files any more