git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21ca78b
)
Fix for #979
author
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Sun, 25 Feb 2007 13:27:29 +0000
(13:27 +0000)
committer
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Sun, 25 Feb 2007 13:27:29 +0000
(13:27 +0000)
src/jquery/jquery.js
patch
|
blob
|
history
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
c309428
..
81b5b64
100644
(file)
--- a/
src/jquery/jquery.js
+++ b/
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 );
}
},