Javascript: missing } in XML expression

There are some issues which are almost impossible to debug, but when you spot whats wrong, you feel incredibly stupid. This was one of those errors.

Got this error, when I copy-pasted javascript code from the <head> of an HTML document and spent close to half an hour figuring out what was wrong. So what was wrong? Well I forgot to strip the <script></script> tags from the Javascript that I copied!

About Pratik Sinha

Linux Nerd, Socialist, Atheist, Adventuristic, Nature Lover, Geeky.


  1. I was pulling my hair out for the past half hour and I couldn’t tell what was wrong with my script.

    Thanks mate.

  2. Oh man, thank you for posting this. I was in the exact same situation and it was driving me nuts. Worse yet, I’d actually deliberately _added_ the script markup to the js file, because it briefly looked like one browser I was developing for required them…

Leave a Reply