Bug Tracker

Opened 10 years ago

Closed 9 years ago

#5548 closed bug (invalid)

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>.

Change History (2)

comment:1 Changed 10 years ago by kleptomac

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); }

comment:2 Changed 9 years ago by dmethvin

Resolution: invalid
Status: newclosed

Please reopen with a complete test case including HTML and script.

Note: See TracTickets for help on using tickets.