From eb1f881d737eb64c81dbd143bc678e202c60d9f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Sun, 25 Feb 2007 13:27:29 +0000 Subject: [PATCH] Fix for #979 --- src/jquery/jquery.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index c309428..81b5b64 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 ); } }, -- 1.7.10.4