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

Infinite recursion with certain html #420

Open
ml-oliver opened this issue Jul 25, 2024 · 0 comments
Open

Infinite recursion with certain html #420

ml-oliver opened this issue Jul 25, 2024 · 0 comments

Comments

@ml-oliver
Copy link

HTML in the attached file below causes infinite loop of some kind, uses all CPU and process hangs indefinitely.

hubspot.txt

  • Version by 2024.2.26
  • Test script
def convert_to_text():
    converter = html2text.HTML2Text()
    # html from http://www.hubspot.com
    with open("hubspot.txt", "r") as f:
        text = f.read()
    print("Running html2text...")
    text = converter.handle(text)
    # hangs here and uses all CPU.
    print(text)

  • Python version 3.11
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

No branches or pull requests

1 participant