allow script element in head and end of body

fixed typo from #169
Merge pull request #170 from nlbdev/issue-167

allow script element in head and end of body