Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try html.unescape first to escape HTML #23

Open
wants to merge 1 commit into
base: matrix
Choose a base branch
from

Conversation

diederikdehaas
Copy link

The unescape function is part of the html module since python 3.4 and since 3.9 it's giving an AttributeError when using HTMLParser.unescape, so use the html.unescape function by default and only fall back to the old method on error (i.e. python < 3.4).

The unescape function is part of the `html` module since python 3.4 and
since 3.9 it's giving an AttributeError when using
`HTMLParser.unescape`, so use the `html.unescape` function by default
and only fall back to the old method on error (i.e. python < 3.4).
@jose1711
Copy link

Thank you, hopefully this will be merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants