X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=4eb19eaf0271b5b84796d1fe195f9b793d9ddefc;hb=9195107dbb13ad34ae4e9f7cb1df5d79e4748560;hp=7500730f9d699b27d63f9f22e0a5462b99b48e5f;hpb=61e37d41490aed319a176c6ca7feb95e5505059c;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index 7500730..4eb19ea 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -4,7 +4,9 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/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 +224,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" && !/