Side navigation
#4422 closed bug (duplicate)
Opened March 25, 2009 10:14PM UTC
Closed August 07, 2009 04:56PM UTC
Last modified April 22, 2011 09:31AM UTC
Clone under IE8 - form with trailing / in action
Reported by: | doug316 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | core | Version: | 1.2.6 |
Keywords: | ie8 form clone | Cc: | doug316@gmail.com |
Blocked by: | Blocking: |
Description
IE8 version 8.0.6001.18702
When cloning a form in IE8 with a trailing slash in the action, the form opening tag is incorrectly treated as an open/close tag. Its children are treated as children of the form's parent rather than the form, and the original form close tag is without a matching open.
Using the included code, view the HTML under IE8, and then browse the DOM. Within '#div2 .contents form ' you'll notice that there are no inputs, and that the inputs are children of the parent '.contents'. Compare with #div1.
When I browse the code using IE DebugBar, the quotes on the action do not appear and the trailing slash immediately precedes the closing >.
Remove the trailing slash from the action, and the bug no long occurs.
Attachments (1)
Change History (5)
Changed March 26, 2009 02:09AM UTC by comment:1
Changed March 26, 2009 02:14AM UTC by comment:2
Also see #4417; it looks like the problem does happen with double quotes too.
Changed August 07, 2009 04:56PM UTC by comment:3
component: | unfilled → core |
---|---|
resolution: | → duplicate |
status: | new → closed |
Closing as a dup of #4417.
Changed January 22, 2010 07:10AM UTC by comment:4
Stumbled across this same problem. It still exists in 1.4
Changed April 22, 2011 09:31AM UTC by comment:5
source:
<div id="dialog_template" style="display: none;">
<form action="/restaurants/" method="POST">
<input name="query_reserve" value="true" type="hidden"/>
<input name="address" value="" type="hidden"/>
<input name="reserve" value="" type="hidden"/>
...
</form>
</div>
code:
dialog_template = jQuery("#dialog_template").html();
jQuery("#dialog_template").remove();
result in ie8:
<FORM method=post action=/restaurants></FORM><INPUT name=query_reserve value=true type=hidden> <INPUT name=address type=hidden> ... </FORM>
bug fixes:
change action to <form action="/restaurants" method="POST">
Oooh, that's a good one.
I don't have IE8 handy on this system...If you dump out
does the form tag look something like this, i.e., with your quotes stripped?As part of another IE workaround, jQuery uses
in so if the quotes are stripped out by IE it is generating bad HTML.Does the same thing happen if you use double quotes?