Permalink
Browse files

Merge pull request #3 from jsantell/master

fix global leak of testAllowed, findTags, findAttribs
  • Loading branch information...
2 parents b8e42c6 + 12ecdf2 commit 86c379f73643ddb64a8db4caa47c272d2347dbde @andris9 committed Jul 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/markdown.js
View
@@ -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 86c379f

Please sign in to comment.