Fixed parsing of html mixed with javascript.