Last Comment Bug 144432 - - Partial HTML comments in JavaScript cause problems
: - Partial HTML comments in JavaScript cause problems
Product: Tech Evangelism Graveyard
Classification: Graveyard
Component: English US (show other bugs)
: unspecified
: All All
-- normal
: ---
Assigned To: english-us
Depends on:
  Show dependency treegraph
Reported: 2002-05-14 07:03 PDT by Robert Myers
Modified: 2015-04-19 23:39 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

Reproduction of (perceived) bug caused by Site Meter code (950 bytes, text/html)
2002-05-15 06:27 PDT, Robert Myers
no flags Details

Description User image Robert Myers 2002-05-14 07:03:32 PDT
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.
Comment 1 User image Phil Schwartau 2002-05-14 23:05:13 PDT
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.
Comment 2 User image Boris Zbarsky [:bz] (still a bit busy) 2002-05-14 23:21:14 PDT
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....
Comment 3 User image Robert Myers 2002-05-15 06:27:00 PDT
Created attachment 83713 [details]
Reproduction of (perceived) bug caused by Site Meter code

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.
Comment 4 User image Boris Zbarsky [:bz] (still a bit busy) 2002-05-15 06:47:59 PDT
Ah, ok.  This is only a problem because the page is in standards mode...

So over to evangelism to get Site Meter fixed.
Comment 5 User image Susie Wyshak 2003-05-14 17:40:46 PDT
Here is contact info:
Comment 6 User image Bob Clary [:bc:] 2003-06-12 07:20:53 PDT
tech evang june 2003 reorg
Comment 7 User image sjw 2014-01-18 05:31:36 PST
The site does not use this script anymore.

Note You need to log in before you can comment on or make changes to this bug.