[Webkit-unassigned] [Bug 34947] Error Console finding more errors than it should: Unmatched </p> encountered

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 15 10:32:56 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=34947


Mark Rowe (bdash) <mrowe at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID




--- Comment #2 from Mark Rowe (bdash) <mrowe at apple.com>  2010-02-15 10:32:56 PST ---
This is correct behavior.  A p element cannot contain a form element, so when
the opening tag for the form is encountered it is considered to implicitly
close the p element.  When the </p> is later encountered it does not match any
open element so a warning is emitted and it is converted in to an empty p
element.

You can see a visual representation of this at
<http://james.html5.org/cgi-bin/parsetree/parsetree.py?source=%3Cp%3E%3Cform%3E%3C%2Fp%3E>.
 The HTML 5 specification at
<http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#optional-tags>
says the following:

A p element's end tag may be omitted if the p element is immediately followed
by an address, article, aside, blockquote, dir, div, dl, fieldset, footer,
form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, menu, nav, ol, p, pre,
section, table, or ul, element, or if there is no more content in the parent
element and the parent element is not an a element.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list