Closed Bug 277385 Opened 20 years ago Closed 20 years ago

generated javascript not parsed correctly, the code appears on the page

Categories

(Core :: DOM: HTML Parser, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: tomasare, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; chrome://navigator/locale/navigator.properties; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20050106

The page http://fourier.opoint.com/parse_error.html (originally found on
http://www.aftenposten.no/nyheter/sport/golf/article940386.ece), parts of
javascript code that is generated by other javascript code, apperas as text on
the page.

Reproducible: Always

Steps to Reproduce:
1. Open the url http://fourier.opoint.com/parse_error.html
2. Observe tht parts of the js-code is printed as text

Actual Results:  
parts of the js-code is printed as text

Expected Results:  
no js-code should appear

Also tested and works correctly on:
Mozilla/5.0 (X11; U; Linux i686; chrome://navigator/locale/navigator.properties;
rv:1.7.5) Gecko/20041107 Firefox/1.0

Mozilla 1.7.3
This looks invalid. I think the bug that caused this 'regression' is bug 265814.
After soom looking, I see in the actual function called (by the nested
document.write()'n <script>):

document.write ('<!-- \n');
document.write ('<!-- \n'); ...
document.write ('--><SCRIPT Language='); ...

Which before (and in view-selection-source) was parsed in quirks mode, but we
now parse everything in standards mode, so the <script> is commented out until
later, when we see:
document.write ('<!--\n'); ... document.write('...>');

which ends the comment. I think this should probably go to TE for the adserver's
doubly-opened comment.
Marking INVALID based on my previous comment.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.