Skip to content

Commit 1deae80

Browse files
committed
Incorret use of re.find
1 parent 12a872f commit 1deae80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/html5lib/sanitizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ def sanitize_token(self, token):
162162
' ',
163163
unescape(attrs[attr]))
164164
if (token["name"] in self.svg_allow_local_href and
165-
'xlink:href' in attrs and re.find('^\s*[^#\s].*',
166-
attrs['xlink:href'])):
165+
'xlink:href' in attrs and re.search('^\s*[^#\s].*',
166+
attrs['xlink:href'])):
167167
del attrs['xlink:href']
168168
if attrs.has_key('style'):
169169
attrs['style'] = self.sanitize_css(attrs['style'])

0 commit comments

Comments
 (0)