Fix for #979
This commit is contained in:
parent
21ca78bcd0
commit
eb1f881d73
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
|
@ -1313,6 +1313,8 @@ jQuery.extend({
|
||||||
// internal only, use is(".class")
|
// internal only, use is(".class")
|
||||||
has: function( t, c ) {
|
has: function( t, c ) {
|
||||||
t = t.className || t;
|
t = t.className || t;
|
||||||
|
// escape regex characters
|
||||||
|
c = c.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1");
|
||||||
return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t );
|
return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue