Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for #979
  • Loading branch information
jzaefferer committed Feb 25, 2007
1 parent 21ca78b commit eb1f881
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jquery/jquery.js
Expand Up @@ -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 );
}
},
Expand Down

0 comments on commit eb1f881

Please sign in to comment.