Skip to content

Commit

Permalink
fix global leak of testAllowed, findTags, findAttribs
Browse files Browse the repository at this point in the history
  • Loading branch information
jsantell committed Jul 14, 2012
1 parent b8e42c6 commit 12ecdf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -122,4 +122,4 @@ var stripUnwantedHTML = function(html /*, allowedTags, allowedAttributes, forceP
}

});
}
}

0 comments on commit 12ecdf2

Please sign in to comment.