I find this very strange, must be something I'm doing wrong, but still... I'm working on a page using PHP and TPL files. In my TPL file, there's a place in the footer for some extra lines if needed.
For instance, formchecking with Javascript.
so in PHP I did this:
$foot = "<script type=\"text/javascript\">if(document.getElementById){loadEvents();}</script>";
the $foot variable is then parsed and the result in HTML is this:
<script type="text/javascript">if(document.getElementById)</script>
So {loadEvents();}
went missing.
Does anybody see what I'm missing here... I'm seriously not finding it. Did I forget to escape a character or something?