Permalink
Browse files

fix global leak of testAllowed, findTags, findAttribs

  • Loading branch information...
1 parent b8e42c6 commit 12ecdf2de231e2845d48ad86095018bf747aeedc @jsantell jsantell committed Jul 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/markdown.js
View
4 lib/markdown.js
@@ -43,7 +43,7 @@ var stripUnwantedHTML = function(html /*, allowedTags, allowedAttributes, forceP
'img': 'src|width|height|alt',
'a': 'href',
'*': 'title'
- }, forceProtocol = arguments[3] || false;
+ }, forceProtocol = arguments[3] || false,
testAllowed = new RegExp('^('+allowedTags.toLowerCase()+')$'),
findTags = /<(\/?)\s*([\w:\-]+)([^>]*)>/g,
@@ -122,4 +122,4 @@ var stripUnwantedHTML = function(html /*, allowedTags, allowedAttributes, forceP
}
});
-}
+}

0 comments on commit 12ecdf2

Please sign in to comment.