X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=325f303a8316d399a654c33f33926ee43fd34e62;hb=0368606c081fd15dfbcd8509734ef63c58a6b008;hp=237e957e56fdb552f2b17edde0e9aca82b555310;hpb=6d23f2fd81f9f1894060a353e66effdf9738af16;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index 237e957..325f303 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -1,47 +1,66 @@ +(function( jQuery ) { + var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rleadingWhitespace = /^\s+/, - rsingleTag = /^<(\w+)\s*\/?>$/, - rxhtmlTag = /(<(\w+)[^>]*?)\/>/g, - rselfClosing = /^(?:abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i, - rinsideTable = /^<(thead|tbody|tfoot|colg|cap)/, - rtbody = /]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /\s]+\/)>/g, + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
", "
" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + col: [ 2, "", "
" ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }; -jQuery.fn.extend({ - text: function( text ) { - if ( typeof text !== "object" && text !== undefined ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; - var ret = ""; +// IE can't serialize and