Closed Bug 214874 Opened 22 years ago Closed 22 years ago

[FIXr]scripts are executed when innerHTML is set

Categories

(Core :: DOM: Core & HTML, defect, P1)

x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla1.5beta

People

(Reporter: svdmade, Assigned: bzbarsky)

References

()

Details

(Keywords: regression, testcase)

Attachments

(4 files)

1 Open the page www.tweakers.net 2 The page starts loading OK 3 The page starts opening webads and turns into a white page
WFM 20030729 PC/WinXP. You have given no information about what version of Mozilla you are using. Nor is there any reason cited for assigning this to JavaScript Engine. Resolving invalid; insufficient information in the report. Please reopen if you can provide a more complete bug report. http://www.mozilla.org/quality/bug-writing-guidelines.html
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
The version of mozilla that I'm using is 20030802 on Linux and Windows 2000 SP2. The reason to assign this bug to javascript is this source of the page <script language='javascript' src='http://adserver.webads.nl/jserver/ACC_RANDOM=1059854227/SITE=TWEAKERS/AREA=TWEAKERS_HOME/AAMSZ=TEXTBOX/WPC=YES/POSITION=TOP'></script><img src='http://www.tweakers.net/advertenties/adlog.php?bannerid=141&amp;clientid=83&amp;zoneid=18&amp;source=&amp;block=0&amp;capping=0&amp;cb=5d7063a2eb906c0691edf9d2ff4bf40f' width='0' height='0' alt='' style='width: 0px; height: 0px;'><a HREF="http://adserver.webads.nl/adclick/CID=fffffffcfffffffcfffffffc/ACC_RANDOM=1059854227/SITE=TWEAKERS/AREA=TWEAKERS_HOME/AAMSZ=TEXTBOX/WPC=YES/POSITION=TOP" TARGET="_NEW"><img SRC="http://images.webads.nl/ads/default.gif" ALT="" width=-1 height=-1 BORDER=0></a>
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Attached image Screenshot of redirect
I also get redirected to this page (sometimes blank, sometimes with a real ad content). The <title> is strange: textboxtest.
Attached file testcase
load this one. with linux trunk 20030802, it just shows "bar"
this regressed between linux trunk 2003073109 and 2003080105. Axel: could this have regressed due to your checkin for bug 151002? certainly now JS Engine ==> DOM 0
Status: REOPENED → NEW
Keywords: regression, testcase
oops. ==> DOM 0 for real Axel: could this have regressed due to bug 151002
Assignee: rogerl → dom_bugs
Component: JavaScript Engine → DOM Level 0
QA Contact: pschwartau → ashishbhatt
bug 151002 has nothing to do with anything in the vicinity of the testcase. no idea what's going on, though. bzbarsky changed something with scripts in what I think is the time between wfm and the buggy behaviour. Though I wouldn't know why this would make a difference. Of course, there's deDOMification, too. bz, mind taking a look? (btw, I can reproduce on my debug build from 08/01/2003 on WinME.) bonsai query for the time: http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=mozilla%2Fdom+mozilla%2Fcontent&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=07%2F28%2F2003&maxdate=08%2F02%2F2003&cvsroot=%2Fcvsroot
Having the same problems with www.tweakers.net and www.cdfreaks.com. Build Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030801 Mozilla Firebird/0.6.1 I tracked it down to those document.getElementById('foo').innerHTML=document.getElementById('bar').innerHTML; things too. Saving the page and commenting that out in the scripts corrects te problem, but (ofcourse) it keeps the ads from appearing.
The testcase in Comment #7 definately shows the problem. However, I cannot replicate the bug every time. For example, when I hit Stop somewhere halfway loading www.tweakers.net, I can reload it without any problem and the banner also shows up normally.
> bonsai query for the time the regression is between trunk 2003073005 and 2003073105 (not between 7/31 and 8/01 as I said earlier), so this is definitely 214081
Problem remaining in 2003080704, since trunk is frozen will this be blocking 1.5 final (or beta)? (it probably affects many more sites than only tweakers.net and cdfreaks.com)
*** Bug 215505 has been marked as a duplicate of this bug. ***
resummarizing... please fix if I don't know what's going on. this does seem like a significant regression, but it hasn't been reported for other sites (that I know of)
Summary: www.tweakers.net loads to 50% ok and then turns into a blank page → document.write() and close() sometimes clobber original document
I don't believe it's just document.write() and document.close(). I think they work fine, if not used with thos innerHTML things.
OS: Linux → All
Actually, the regression here is that now scripts get executed when innerHTML is set. This is definitely a regression from bug 214081; taking. Fwiw, the original fix that I regressed was that for bug 116834.
Assignee: dom_bugs → bz-vacation
Severity: normal → major
Flags: blocking1.5b?
Priority: -- → P1
Summary: document.write() and close() sometimes clobber original document → [FIX]scripts are executed when innerHTML is set
Target Milestone: --- → mozilla1.5beta
Attached patch PatchSplinter Review
This basically backs out the scriptloader changes from bug 214081 (except it leaves in the mDocument->IsScriptEnabled() check, which we want to treat the same way as scripts being disabled in the script context).
Comment on attachment 129510 [details] [diff] [review] Patch jst, could you please review this?
Attachment #129510 - Flags: superreview?(jst)
Attachment #129510 - Flags: review?(jst)
Comment on attachment 129510 [details] [diff] [review] Patch r+sr=jst. If anything, I'd combine the early returns and the calls to FireScriptAvailable() into one place, but either way works for me...
Attachment #129510 - Flags: superreview?(jst)
Attachment #129510 - Flags: superreview+
Attachment #129510 - Flags: review?(jst)
Attachment #129510 - Flags: review+
Comment on attachment 129510 [details] [diff] [review] Patch Could this please be approved for 1.5b? Fixes a pretty serious innerHTML regression.
Attachment #129510 - Flags: approval1.5b?
Summary: [FIX]scripts are executed when innerHTML is set → [FIXr]scripts are executed when innerHTML is set
Comment on attachment 129510 [details] [diff] [review] Patch a=dveditz for drivers
Attachment #129510 - Flags: approval1.5b? → approval1.5b+
Fix checked in to 1.5b trunk.
Status: NEW → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
The bug fix has also been implemented now in the latest nightly build. Thanks
Flags: blocking1.5b?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: