#24267 closed defect (bug) (duplicate)
JavaScript Syntax Error
| Reported by: | 1994rstefan | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
If you user HTML-Comments to hide JavaScript for browsers that do not support JavaScript, the closing HTML-Comment-Tag have to be a JavaScript-Comment
So instead of this Code:
<script type="text/javascript">
<!--
[some JavaScript]
-->
</script>
You should use
<script type="text/javascript">
<!--
[some JavaScript]
-->
</script>
Otherwise some Browsers will fail because of invalid JavaScript.
This is also descriped on w3schools (http://www.w3schools.com/tags/tag_comment.asp)
This error can be found in:
wp-includes/file.php on line 980
wp-includes/media.php on line 2075
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Sorry, the Bug-Tracker escapes a double slash, it should say (without space):
<script type="text/javascript">
<!--
[some JavaScript]
/ / -->
</script>