diff --git a/src/ajax.js b/src/ajax.js old mode 100644 new mode 100755 index 7b15a1d80f..295af677e3 --- a/src/ajax.js +++ b/src/ajax.js @@ -1,7 +1,7 @@ var jsc = now(), - rscript = //gi, - rselectTextarea = /select|textarea/i, - rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i, + rscript = /]*>/gi, + rselectTextarea = /^(?:select|textarea)$/i, + rinput = /^(?:color|date(?:time)?|email|hidden|month|number|password|range|search|t(?:el|ext|ime)|url|week)$/i, jsre = /=\?(&|$)/, rquery = /\?/, rts = /(\?|&)_=.*?(&|$)/, diff --git a/src/attributes.js b/src/attributes.js old mode 100644 new mode 100755 index 4f7055a6e4..549aff75f2 --- a/src/attributes.js +++ b/src/attributes.js @@ -1,11 +1,11 @@ var rclass = /[\n\t]/g, rspace = /\s+/, rreturn = /\r/g, - rspecialurl = /href|src|style/, - rtype = /(button|input)/i, - rfocusable = /(button|input|object|select|textarea)/i, + rspecialurl = /^(?:href|src|style)$/, + rtype = /^(button|input)$/i, + rfocusable = /^(button|input|object|select|textarea)$/i, rclickable = /^(a|area)$/i, - rradiocheck = /radio|checkbox/; + rradiocheck = /^(?:radio|checkbox)$/; jQuery.fn.extend({ attr: function( name, value ) { diff --git a/src/core.js b/src/core.js old mode 100644 new mode 100755 index ba5d7f5288..4110191233 --- a/src/core.js +++ b/src/core.js @@ -21,13 +21,13 @@ var jQuery = function( selector, context ) { quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/, // Is it a simple selector - isSimple = /^.[^:#\[\.,]*$/, + isSimple = /^.[^:#\[.,]*$/, // Check if a string has a non-whitespace character in it rnotwhite = /\S/, // Used for trimming whitespace - rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g, + rtrim = /^[\s\u00A0]+|[\s\u00A0]+$/g, // Match a standalone tag rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, diff --git a/src/css.js b/src/css.js old mode 100644 new mode 100755 index 5d31757b05..9fb7be9652 --- a/src/css.js +++ b/src/css.js @@ -1,5 +1,5 @@ // exclude the following css properties to add px -var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, +var rexclude = /^(?:z-?index|font-?weight|opacity|zoom|line-?height)$/i, ralpha = /alpha\([^)]*\)/, ropacity = /opacity=([^)]*)/, rfloat = /float/i, diff --git a/src/effects.js b/src/effects.js old mode 100644 new mode 100755 index 7fa7342088..16da98e40d --- a/src/effects.js +++ b/src/effects.js @@ -1,5 +1,5 @@ var elemdisplay = {}, - rfxtypes = /toggle|show|hide/, + rfxtypes = /^(?:toggle|show|hide)$/, rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/, timerId, fxAttrs = [ diff --git a/src/event.js b/src/event.js old mode 100644 new mode 100755 index d91231e868..1716cc7c3c --- a/src/event.js +++ b/src/event.js @@ -687,7 +687,7 @@ if ( !jQuery.support.submitBubbles ) { // change delegation, happens here so we have bind. if ( !jQuery.support.changeBubbles ) { - var formElems = /textarea|input|select/i, + var formElems = /^(?:textarea|input|select)$/i, changeFilters, diff --git a/src/manipulation.js b/src/manipulation.js old mode 100644 new mode 100755 index 196f230720..7e1ed2cbdf --- a/src/manipulation.js +++ b/src/manipulation.js @@ -5,7 +5,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rtagName = /<([\w:]+)/, rtbody = /