mirror of
https://github.com/jquery/jquery.git
synced 2026-02-12 21:35:05 -05:00
Fix #12959: Optimize library-wide patterns
This commit is contained in:
@@ -15,20 +15,20 @@ function createSafeFragment( document ) {
|
||||
var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
|
||||
"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
|
||||
rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
|
||||
rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
|
||||
rleadingWhitespace = /^\s+/,
|
||||
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
|
||||
rtagName = /<([\w:]+)/,
|
||||
rtbody = /<tbody/i,
|
||||
rhtml = /<|&#?\w+;/,
|
||||
rnoInnerhtml = /<(?:script|style|link)/i,
|
||||
rnocache = /<(?:script|object|embed|applet|option|style)/i,
|
||||
rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
|
||||
rcheckableType = /^(?:checkbox|radio)$/,
|
||||
rnocache = /<(?:script|style|object|embed|applet|option)/i,
|
||||
manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
|
||||
// checked="checked" or checked
|
||||
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
||||
rscriptType = /^$|\/(?:java|ecma)script/i,
|
||||
rscriptTypeMasked = /^true\/(.*)/,
|
||||
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,
|
||||
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
|
||||
wrapMap = {
|
||||
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
||||
legend: [ 1, "<fieldset>", "</fieldset>" ],
|
||||
@@ -485,7 +485,7 @@ function cloneFixAttributes( src, dest ) {
|
||||
dest.innerHTML = src.innerHTML;
|
||||
}
|
||||
|
||||
} else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
|
||||
} else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
|
||||
// IE6-8 fails to persist the checked state of a cloned checkbox
|
||||
// or radio button. Worse, IE6-7 fail to give the cloned element
|
||||
// a checked appearance if the defaultChecked value isn't also set
|
||||
@@ -611,7 +611,7 @@ function getAll( context, tag ) {
|
||||
|
||||
// Used in clean, fixes the defaultChecked property
|
||||
function fixDefaultChecked( elem ) {
|
||||
if ( rcheckableType.test( elem.type ) ) {
|
||||
if ( manipulation_rcheckableType.test( elem.type ) ) {
|
||||
elem.defaultChecked = elem.checked;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user