Alir3z4 / html2text

Convert HTML to Markdown-formatted text.
alir3z4.github.io/html2text/
GNU General Public License v3.0
1.85k stars 279 forks source link

charref() maybe throw OverflowError: Python int too large to convert to C int #398

Open liujuncn opened 1 year ago

liujuncn commented 1 year ago

in charref(): if name[0] in ["x", "X"]: c = int(name[1:], 16) else: c = int(name) if name like "xabcdeabcdeabcdeabcde" will cause chr(c) throw OverflowError.

liujuncn commented 1 year ago

I simply fixed it with: c = int(name[1:5], 16)