X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=99d51a80cacb0ca20cde0d8cdca49c534b086a41;hb=b5b3c73db3e4e615e504cd0af08ff6842b104542;hp=93950de0f2472ba298e6ff401e00c8bf21ffbf7f;hpb=388a00fe918c2ec759bd33c34bfc13aabfe413d0;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index 93950de..99d51a8 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -1,16 +1,15 @@ +(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 = /"; - }, + rhtml = /<|&#?\w+;/, + rnocache = /<(?:script|object|embed|option|style)/i, + // checked="checked" or checked (html5) + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + raction = /\=([^="'>\s]+\/)>/g, wrapMap = { option: [ 1, "" ], legend: [ 1, "
", "
" ], @@ -44,7 +43,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 +202,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 +227,11 @@ jQuery.fn.extend({ null; // See if we can take a shortcut and just use innerHTML - } else if ( typeof value === "string" && !/