Closed Bug 118792 Opened 23 years ago Closed 23 years ago

Save Complete Web Page screws up document.write() calls (and other dynamic DOM modifications)

Categories

(Core Graveyard :: File Handling, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 115328

People

(Reporter: bzbarsky, Assigned: adamlock)

References

()

Details

(Keywords: dataloss, regression)

See bug 118251, Comment #5 and bug 118251 comment #7. Basically, passing the current DOM to WebBrowserPersist is bad because it completely screws up on any page that does dynamic DOM modification. We need to pass in the original DOM _before_ executing any top-level scripts or the like. The problem with the current implementation is that content written with document.write() will appear twice in the saved version -- once because the script is saved, once because the content itself is saved.
adding dataloss, since this can make _major_ modifications to the page source (consider a script that removes some <script> nodes from the DOM after they have run, for example).
Keywords: dataloss, regression
Is it out of the question, for complete page save, to reget the source from cache (or whereever the pristine copy is), and have a seperate parser reparse it for links to rewrite? I have a feeling we'd never be able to eliminiate all of the cases were DOM->disk does bad stuff.
Blocks: 115634
->adamlock. This explains issues with saving sites like cnn.com
Assignee: ben → adamlock
I will dup this against bug 115328 seeing as I own both of them. While this bug actually is actually an xpfe problem - to feed the persist object a pristine DOM & not a used one - it shares the same issues as embedding faces and a solution can probably be fashioned to address both instances (possibly). *** This bug has been marked as a duplicate of 115328 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
vrfy dup
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.