diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2007-02-25 13:27:29 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2007-02-25 13:27:29 +0000 |
commit | eb1f881d737eb64c81dbd143bc678e202c60d9f9 (patch) | |
tree | a05d2757657b10945033fe04c4a2a4ec50ae43fb /src | |
parent | 21ca78bcd0c800ad8b54dcd7c73418e219f0ce49 (diff) | |
download | jquery-eb1f881d737eb64c81dbd143bc678e202c60d9f9.tar.gz jquery-eb1f881d737eb64c81dbd143bc678e202c60d9f9.zip |
Fix for #979
Diffstat (limited to 'src')
-rw-r--r-- | src/jquery/jquery.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index c309428ea..81b5b64e7 100644 --- 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 ); } }, |