Common problem, just wrap it in CDATA tags…
<script type="text/javascript">
/*<![CDATA[*/
// place javascript here i.e.
function myFunction () {
// do something
}
/*]]>*/
</script>
Related posts:
