diff options
-rw-r--r-- | src/manipulation/wrapMap.js | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/manipulation/wrapMap.js b/src/manipulation/wrapMap.js index a7b913c90..fdb430a03 100644 --- a/src/manipulation/wrapMap.js +++ b/src/manipulation/wrapMap.js @@ -6,20 +6,13 @@ var wrapMap = { // Support: IE9 option: [ 1, "<select multiple='multiple'>", "</select>" ], + // 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 - - // Auto-insert "colgroup" element - col: [ 2, "<table>", "</table>" ], - - // Auto-insert "tbody" element - tr: [ 2, "<table>", "</table>" ], - - // Auto-insert "tbody" and "tr" elements - td: [ 3, "<table>", "</table>" ], + col: [ 2, "<table><colgroup>", "</colgroup></table>" ], + tr: [ 2, "<table><tbody>", "</tbody></table>" ], + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], _default: [ 0, "", "" ] }; |