Bug 4058 - document.write into an iframe turns > character into < (double escaping)
Summary: document.write into an iframe turns > character into < (double escaping)
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2005-07-18 14:02 PDT by Vicki Murley
Modified: 2006-11-14 11:40 PST (History)
2 users (show)

See Also:


Attachments
test case (14.68 KB, text/html)
2005-07-18 14:02 PDT, Vicki Murley
no flags Details
test case created by vicki to try to figure out what the bug is here (843 bytes, text/html)
2005-07-27 17:37 PDT, Vicki Murley
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vicki Murley 2005-07-18 14:02:17 PDT
<rdar://problem/3542781>

I have created a page which contains a div with the display set to none.  Inside of the div is a script block 
conatining javascript which will later be written into the contents of an iframe.  When the user types in the 
textbox on the page I create an iframe and write the contents of the div described above, which includes 
javascript to provide functinality in the iframe.  The problem is, when the contents of the div are written to 
the iframe using theiframe.document.write(divcontents) the > caracter is escaped to look like &amp;lt; 
thus causing any value comparison to fail such as a for(i = 0; i < thevalue; i++) to fail.
Comment 1 Vicki Murley 2005-07-18 14:02:58 PDT
Created attachment 3005 [details]
test case
Comment 2 Vicki Murley 2005-07-18 14:03:34 PDT
This test case needs some cleaning up, but it was what was originally attached to the bug.
Comment 3 Vicki Murley 2005-07-27 17:37:11 PDT
Created attachment 3128 [details]
test case created by vicki to try to figure out what the bug is here
Comment 4 Vicki Murley 2005-07-29 10:59:29 PDT
I used the code originally attached and the description of the problem to make a reduced test case.  

As far as I can see, this is working as expected.  In my test case, the script that I wrote to the iframe has a 
for loop with a ">" as you described.  This for loop, which puts up an alert, seems to be working just fine.

Could you clarify what the bug is here?  Please feel free to make modifications to the test case that I 
attached (iframe-test.html).  

I've assigned the Radar bug back to the originator for comment.
Comment 5 Alexey Proskuryakov 2006-11-14 11:40:57 PST
This report doesn't contain enough information to work on it, closing as INVALID.