mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Manipulation: Don't provide the parser with sloppy table markup
While we can reply on parsers that were designed to cope with malformed syntax to understand what we mean, we shouldn't intentionally provide bad markup, not all parsers will accept it. "Be conservative in what you do, be liberal in what you accept from others." (cherry-picked from99e8ff1baa
) Reverts0ea342a6a6
Refs gh-2031 Refs gh-2002 Fixes gh-2493 Closes gh-2499
This commit is contained in:
parent
ead83b9c8a
commit
81b6e46522
@ -9,21 +9,13 @@ var wrapMap = {
|
||||
// Support: IE8
|
||||
param: [ 1, "<object>", "</object>" ],
|
||||
|
||||
// XHTML parsers do not magically insert elements in the
|
||||
// same way that tag soup parsers do. So we cannot shorten
|
||||
// this by omitting <tbody> or other required elements.
|
||||
thead: [ 1, "<table>", "</table>" ],
|
||||
|
||||
// Some of the following wrappers are not fully defined, because
|
||||
// their parent elements (except for "table" element) could be omitted
|
||||
// since browser parsers are smart enough to auto-insert them
|
||||
|
||||
// Support: Android 2.3
|
||||
// Android browser doesn't auto-insert colgroup
|
||||
col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
|
||||
|
||||
// Auto-insert "tbody" element
|
||||
tr: [ 2, "<table>", "</table>" ],
|
||||
|
||||
// Auto-insert "tbody" and "tr" elements
|
||||
td: [ 3, "<table>", "</table>" ],
|
||||
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
||||
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
||||
|
||||
// IE8 can't serialize link, script, style, or any html5 (NoScope) tags,
|
||||
// unless wrapped in a div with non-breaking characters in front of it.
|
||||
|
Loading…
Reference in New Issue
Block a user