10000 htmlentityreplace_errors always raised an exception (reference to var… · awesome-python/html5lib-python@a546f65 · GitHub
[go: up one dir, main page]

Skip to content

Commit a546f65

Browse files
committed
htmlentityreplace_errors always raised an exception (reference to variable 'ex' instead of 'exc').
TODO: This really needs to be unit-tested... --HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40854
1 parent 5b60568 commit a546f65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/html5lib/serializer/htmlserializer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
def htmlentityreplace_errors(exc):
3333
if isinstance(exc, (UnicodeEncodeError, UnicodeTranslateError)):
3434
res = []
35-
for c in ex.object[exc.start:exc.end]:
35+
for c in exc.object[exc.start:exc.end]:
3636
c = encode_entity_map.get(c)
3737
if c:
3838
res.append("&")

0 commit comments

Comments
 (0)
0