content of document.write() is duplicated when page is saved with saving completely

RESOLVED DUPLICATE of bug 115328

Status

()

RESOLVED DUPLICATE of bug 115328
9 years ago
9 years ago

People

(Reporter: qdinar, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.0.12) Gecko/2009070818 Ubuntu/8.10 (intrepid) Firefox/3.0.12
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.0.12) Gecko/2009070818 Ubuntu/8.10 (intrepid) Firefox/3.0.12

try this way: create a file with name "test123.html" and write this into it:
<script>document.write("hello");</script>
and save this file, then open it with firefox and save it with menu-file-save as-completely with name like test1234.html , then open the file saved with firefox with text editor or with firefox, you will see that "hello" is duplicated. in text editor you will see like this:
<html><head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251"><script>document.write("hello");</script></head><body>hello
</body></html>
if you open it with any browser you will see:
hellohello
.firefox should not write "hello"(document.write()'s content) when saving after "</script>"! because it is already saved one time in <script> tags or in javascript file linked with src attribute of script. if this is made intentionally to make it visible if saved file is opned with no-script browser, it is not correct, let they see that content only if they open it with scripts turned on because original site was so.

Reproducible: Always

Steps to Reproduce:
1. save web-page that has script like "document.write('some text')" in it with completely saving
2. open the saved document with any browser with scripts not turned off
3. you will "see some textsome text" - duplicated content of document.write().
Actual Results:  
duplicated content if javascript is turned on

Expected Results:  
correct, not duplicated content, as it is in original page, which is created by script. it should not be duplicated with regular html text outside of <script></script> .

Updated

9 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 115328
You need to log in before you can comment on or make changes to this bug.