X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=3054eea1d3a259f756cc14e3a255f86dc4346bc2;hb=bca576550249e9b79b1097669dff6d4ddd0d65cf;hp=5109cf093b7e916e16bcc2883ca3b1e64653b288;hpb=3776cbe314ac6f5081e998c3d5ac84d3fbc51872;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index 5109cf0..3054eea 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -1,10 +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, rtagName = /<([\w:]+)/, rtbody = / self-closes a tag + .replace(/\=([^="'>\s]+\/)>/g, '="$1">') .replace(rleadingWhitespace, "")], ownerDocument)[0]; } else { return this.cloneNode(true); @@ -172,20 +226,22 @@ jQuery.fn.extend({ html: function( value ) { if ( value === undefined ) { - return this[0] ? + return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(rinlinejQuery, "") : null; // See if we can take a shortcut and just use innerHTML - } else if ( typeof value === "string" && !/