X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=00e31201c8c6fa5d01a7bc50672c3da237009c3a;hb=9dc6e0c572b9c809a3a4c123071d96d48a01dd1c;hp=ed049de7cba1e8339e4789acba8950842c1f1121;hpb=98c7248518f9a2082ccf50240b5ab44bf98d7b5e;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index ed049de..00e3120 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -1,16 +1,14 @@ +(function( jQuery ) { + var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rleadingWhitespace = /^\s+/, - rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g, - rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, rtagName = /<([\w:]+)/, rtbody = /"; - }, + raction = /\=([^="'>\s]+\/)>/g, wrapMap = { option: [ 1, "" ], legend: [ 1, "
", "
" ], @@ -44,7 +42,7 @@ jQuery.fn.extend({ return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); } - return jQuery.getText( this ); + return jQuery.text( this ); }, wrapAll: function( html ) { @@ -203,6 +201,8 @@ jQuery.fn.extend({ } return jQuery.clean([html.replace(rinlinejQuery, "") + // Handle the case in IE 8 where action=/test/> self-closes a tag + .replace(raction, '="$1">') .replace(rleadingWhitespace, "")], ownerDocument)[0]; } else { return this.cloneNode(true); @@ -226,11 +226,11 @@ jQuery.fn.extend({ null; // See if we can take a shortcut and just use innerHTML - } else if ( typeof value === "string" && !/