Permalink
Browse files

transform script tag content to lowercase

  • Loading branch information...
1 parent 9565ca8 commit 236c4860604f0de89364daaa743d884811a20010 @originell committed Mar 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 bleach/sanitizer.py
View
@@ -84,7 +84,7 @@ def sanitize_token(self, token):
basestring)):
self.skip_token = False
# This might be too dumb.
- elif any([keyw in self.previous_token['data']
+ elif any([keyw in self.previous_token['data'].lower()
for keyw in ('"', "'", 'var', ';', '=', '{',
'}', '[', ']', '++', '--', '+=',
'-=', '*=', '/=', '%=', 'return',
@@ -97,7 +97,7 @@ def sanitize_token(self, token):
# Detect if we have finished stripping a <script> tag and it's
# contents.
elif (self.strip_scripts and self.skip_token and
- 'name' in self.previous_token and
+ 'name' in self.previous_token and
'script' in self.previous_token['name'] and
self.previous_token['type'] == 4 and
token['type'] == 3):

0 comments on commit 236c486

Please sign in to comment.