Closed
Bug 293841
Opened 20 years ago
Closed 20 years ago
weird recursive behavior with document.write in data: URL
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: dbaron, Unassigned)
References
()
Details
(Whiteboard: INVALID?)
Attachments
(1 file)
|
11.31 KB,
text/plain; charset=utf-8
|
Details |
Somebody pointed this out on IRC sometime in the past week, and I couldn't find a bug on it. Loading the URL data:text/html,<script>document.write(window.location);</script> causes weird recursive behavior. Steps to reproduce: 1. load data:text/html,<script>document.write(window.location);</script> Expected results: 1. "data:text/html,<script>document.write(window.location);</script>" Actual results: 1. data:text/html,data:text/html,data:text/html,data:text/html,... 2. Error: too much recursion Source File: data:text/html,x<script>document.write(window.location);</script> Line: 1 Stack showing the recursion to be attached.
| Reporter | ||
Comment 1•20 years ago
|
||
Note that frame #0 matches frame #29.
Comment 2•20 years ago
|
||
I was the one who found this and mentioned it on #content. Big fun, and the JS recursion limiter saves the day. Thanks for filing it. /be
Comment 3•20 years ago
|
||
I disagree with the expected results. You're document.write()ing a <script> tag. Thus that <script> tag is going to execute. That <script> tag happens to be what you're currently executing, but that's not the point. To me it seems that this is exactly correct behaviour.
Whiteboard: INVALID?
Comment 4•20 years ago
|
||
Hixie's right! Fun. /be
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Agreed
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•