mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
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")
|
||||
has: function( t, c ) {
|
||||
t = t.className || t;
|
||||
// escape regex characters
|
||||
c = c.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1");
|
||||
return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t );
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user