Skip to content

Commit

Permalink
Use RegExp.escape for Node.hasClass instead of (unexisting) Slick.esc…
Browse files Browse the repository at this point in the history
…apeRegExp
  • Loading branch information
Arian committed Sep 14, 2011
1 parent ed54a5f commit 998785a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Node.js
Expand Up @@ -3,8 +3,8 @@ DOM
*/

define([
'Base/Core/Class', 'Base/Utility/typeOf', 'Base/Utility/Object', 'Base/Utility/Array', 'Base/Utility/String', 'Slick/Finder'
], function(Class, typeOf, Object, Array, String, Slick){
'Base/Core/Class', 'Base/Class/Store', 'Base/Utility/typeOf', 'Base/Utility/Object', 'Base/Utility/Array', 'Base/Utility/String', 'Base/Utility/RegExp', 'Slick/Finder'
], function(Class, Store, typeOf, Object, Array, String, RegExp_, Slick){

// node

Expand Down Expand Up @@ -223,7 +223,7 @@ Element.implement({

var classRegExps = {};
var classRegExpOf = function(string){
return classRegExps[string] || (classRegExps[string] = new RegExp('(^|\\s)' + Slick.escapeRegExp(string) + '(?:\\s|$)'));
return classRegExps[string] || (classRegExps[string] = new RegExp('(^|\\s)' + RegExp_.escape(string) + '(?:\\s|$)'));
};

Element.implement({
Expand Down

0 comments on commit 998785a

Please sign in to comment.