Skip to content

Commit

Permalink
Fix for Alir3z4#74. Invlid unicode ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
theSage21 committed Jun 17, 2015
1 parent 098c63e commit 0bfa819
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions html2text/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,8 @@ def charref(self, name):
return unichr(c)
except NameError: # Python3
return chr(c)
except ValueError: # invalid unicode
return ''

def entityref(self, c):
if not self.unicode_snob and c in config.UNIFIABLE.keys():
Expand Down

0 comments on commit 0bfa819

Please sign in to comment.