git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for #979
[jquery.git]
/
src
/
jquery
/
jquery.js
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
e1840a6
..
81b5b64
100644
(file)
--- a/
src/jquery/jquery.js
+++ b/
src/jquery/jquery.js
@@
-824,7
+824,9
@@
jQuery.fn = jQuery.prototype = {
*/
clone: function(deep) {
return this.pushStack( jQuery.map( this, function(a){
*/
clone: function(deep) {
return this.pushStack( jQuery.map( this, function(a){
- return a.cloneNode( deep != undefined ? deep : true );
+ var a = a.cloneNode( deep != undefined ? deep : true );
+ a.$events = null; // drop $events expando to avoid firing incorrect events
+ return a;
}) );
},
}) );
},
@@
-1311,6
+1313,8
@@
jQuery.extend({
// internal only, use is(".class")
has: function( t, c ) {
t = t.className || t;
// 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 );
}
},
return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t );
}
},