From: Oleg Date: Wed, 19 Dec 2012 16:27:42 +0000 (+0400) Subject: Remove leading white space check X-Git-Tag: 2.0.0b1~59^2~49 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c1c97b474ea7123fabd3e5f0b2192e967c48eb84;p=jquery.git Remove leading white space check --- diff --git a/src/manipulation.js b/src/manipulation.js index 32b5b5f81..e933ba08f 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -1,5 +1,4 @@ -var rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, +var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, rtagName = /<([\w:]+)/, rtbody = /" ); @@ -617,11 +615,6 @@ jQuery.extend({ tmp = tmp.lastChild; } - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - ret.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - // Remove IE's autoinserted from table fragments if ( !jQuery.support.tbody ) { diff --git a/src/support.js b/src/support.js index 25ce0298e..953564013 100644 --- a/src/support.js +++ b/src/support.js @@ -5,7 +5,7 @@ jQuery.support = (function() { // Setup div.setAttribute( "className", "t" ); - div.innerHTML = "
a"; + div.innerHTML = "
a"; // Support tests won't run in some limited or non-browser environments all = div.getElementsByTagName("*"); @@ -24,9 +24,6 @@ jQuery.support = (function() { // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) getSetAttribute: div.className !== "t", - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: div.firstChild.nodeType === 3, - // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables tbody: !div.getElementsByTagName("tbody").length,