Skip to content
Permalink
Browse files
Fix for #979
  • Loading branch information
jzaefferer committed Feb 25, 2007
1 parent 21ca78b commit eb1f881d737eb64c81dbd143bc678e202c60d9f9
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/jquery/jquery.js
@@ -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 );
}
},

0 comments on commit eb1f881

Please sign in to comment.