Side navigation
#5548 closed bug (invalid)
Opened November 25, 2009 08:38AM UTC
Closed June 13, 2010 06:56PM UTC
Form submit fails with Unclosed <P> tag before <Form>.
Reported by: | kleptomac | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | unfiled | Version: | 1.3.2 |
Keywords: | unclosed <P> tag, form submit | Cc: | |
Blocked by: | Blocking: |
Description
Form submit doesn't submit correct values in IE 7 and 8 if there is an unclosed <P> tag before <Form>.
This is the fix for getting it work.
var form = $(document).find('form');
var frm = form.parent().html();
if(frm.toLowerCase().indexOf('form') > -1 && frm.toLowerCase().indexOf('/form') == -1) {
var frmTag = frm.substring(frm.toLowerCase().indexOf('<form'), frm.toLowerCase().indexOf('>')+1);
var rest = frm.substring(frm.toLowerCase().indexOf('>')+1);
form.parent().remove();
form.before(frmTag);
form.prepend(rest);
}