HTML comments inside script problem
-
The following code is from a theme I bought, which has a wrong html comment of the type <– –> inside a tag script:
<script>
<!–pass images–>
var theme_directory = “”;
…rest of code
</script>chrome ignores this comment and does not report it as an error.
but when autoptimize removes the HTML comments within the <script></script> tags, the following error is generated:
Uncaught SyntaxError: Unexpected identifier
<script>
pass images–>
var theme_directory = “”;
…rest of code
</script>Is it correct, that autooptimize within the scope of a script removes code independent of whether it is badly coded? should not leave intact the code that goes inside the tag <script></script>, because that code is interpreted by the JS engine and not by the explorer’s graphic part.
Thank you.
- The topic ‘HTML comments inside script problem’ is closed to new replies.