Closed
Bug 187456
Opened 22 years ago
Closed 22 years ago
composer screws up embedded javascripts featuring document.writes - leaves document.write in code and writes end result of document.write into code
Categories
(SeaMonkey :: Composer, defect)
SeaMonkey
Composer
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: JWooden271, Assigned: Brade)
References
Details
Attachments
(1 file)
|
285 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212
Composer executes javascripts with document.writes and dumps the result into the
html so when you save it and open it again you see double!
Composer also crashes if you attempt to correct the problem!
Reproducible: Always
Steps to Reproduce:
1. Create an HTML file with the following code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
<title>test</title>
<meta name="author" content="JWooden271">
</head>
<body background="">
<script language="javascript">document.write("<b>foo!</b>");</script>
retertert
</body>
</html>
2. Open it in composer and click the <HTML> source tab
3. You will see:
<script language="javascript">document.write("<b>foo!</b>");</script><b>foo!</b>
I think Composer has just discovered how to clone!
4. Try to edit the code to remove the clone - now click another tab - composer
freezes!
Actual Results:
You will be seeing double in the code, and if code is edited composer freezes
Expected Results:
should have ignored script, some things are best left alone.
Original code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
<title>test</title>
<meta name="author" content="JWooden271">
</head>
<body background="">
<script language="javascript">document.write("<b>foo!</b>");</script>
retertert
</body>
</html>
Composer's mangled code:
<html>
<head>
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
<title>test</title>
<meta name="author" content="JWooden271">
</head>
<body background="">
<script language="javascript">document.write("<b>foo!</b>");</script><b>foo!</b>
retertert
</body>
</html>
Comment 2•22 years ago
|
||
Yes, this is probably a dup of the regression regarding JS being executed (sorry, don't have the bug number offhand).
| Assignee | ||
Updated•22 years ago
|
| Assignee | ||
Comment 3•22 years ago
|
||
| Assignee | ||
Comment 4•22 years ago
|
||
-->brade The fix in bug 186054 fixes this bug also (as Akkana predicted)
Assignee: composer → brade
| Assignee | ||
Comment 5•22 years ago
|
||
this fix was checked in (see patch in bug 186054)
Status: NEW → RESOLVED
Closed: 22 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•