Closed Bug 800109 Opened 13 years ago Closed 13 years ago

unbalanced comments in field.html.tmpl script

Categories

(Bugzilla :: Bugzilla-General, defect)

3.6.11
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: gfrancis1, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.79 Safari/537.4 Steps to reproduce: The Summary for my Bug wasn't showing on the Bug page - then I noticed a script error on the page, so I read source of /template/en/default/bug/field.html.tmpl Actual results: @line 171 <script type="text/javascript"> <!-- initHidingOptionsForIE('[% field.name FILTER js %]'); [%+ INCLUDE "bug/field-events.js.tmpl" field = field %] // --> </script> Expected results: <script type="text/javascript"> <!-- initHidingOptionsForIE('[% field.name FILTER js %]'); [%+ INCLUDE "bug/field-events.js.tmpl" field = field %] --> </script>
No, you MUST write // -->, not --> alone, else the JS parser will fail, see http://www.w3.org/TR/html4/interact/scripts.html#h-18.3.2
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Ok but then shouldn't <!-- be changed to //<!-- ?
(In reply to gfrancis1 from comment #2) > Ok but then shouldn't <!-- be changed to //<!-- ? The JavaScript engine allows the string "<!--" to occur at the start of a SCRIPT element, and ignores further characters until the end of the line.
You need to log in before you can comment on or make changes to this bug.