Closed Bug 144432 Opened 19 years ago Closed 7 years ago - Partial HTML comments in JavaScript cause problems


(Tech Evangelism Graveyard :: English US, defect)

Not set


(Not tracked)



(Reporter: developer, Unassigned)





(1 file)

If a JavaScript contains the equivalent of a document.write("<!--"), the rest of
the page is messed up until the page contains --> in a script tag or in HTML text

This is an issue because Site Meter ( has code that
does this. 

The HTML tag <script type="text/javascript" language="JavaScript1.2"
src=""> pulls the
javascript that exhibits the issue.

This was an issue in 0.9.7-0.9.9 Windows as well. Dialogue with site meter did
not get the issue resolved on their end.
Browser, not engine ---> Layout

Robert, do we have to login to the site to see how it gets messed up?
When I simply load the site in Mozilla, it looks OK. What exactly are
the steps to reproduce this?

Better yet, would it be possible for you to write a small HTML testcase
and attach it to this bug via the "Create a New Attachment" link above?
I know it should start out with something like


but I'm not sure how it should continue after that - thanks.
Assignee: rogerl → attinasi
Component: JavaScript Engine → Layout
QA Contact: pschwartau → petersen
Is there another script that writes out a "-->" somewhere?  The script is
starting a comment and never finishing it, so I'd expect all content from there
to the next "-->" to be commented out; anything else would be incorrect....
The javascript depends on standard undefined behavior (inclusion of -- in HTML
comments). Feel free to ignore this bug and/or educate Site Meter.This could be
a wide spread issue, since Site Meter is fairly popular.
Ah, ok.  This is only a problem because the page is in standards mode...

So over to evangelism to get Site Meter fixed.
Assignee: attinasi → doron
Component: Layout → US General
Ever confirmed: true
OS: Linux → All
Product: Browser → Tech Evangelism
QA Contact: petersen → zach
Hardware: PC → All
Version: other → unspecified
Summary: Partial HTML comments in JavaScript cause problems → - Partial HTML comments in JavaScript cause problems
tech evang june 2003 reorg
Assignee: doron → english-us
QA Contact: zach → english-us
The site does not use this script anymore.
Closed: 7 years ago
Resolution: --- → INVALID
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.