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

Segmentation fault with unwrap_tags #32

Closed
satchamo opened this issue Dec 17, 2020 · 1 comment
Closed

Segmentation fault with unwrap_tags #32

satchamo opened this issue Dec 17, 2020 · 1 comment

Comments

@satchamo
Copy link

First, thanks for writing and maintaining this speedy library. It makes a huge difference when parsing thousands of documents compared to other parsers.

Anyway, while attempting to strip the data tag from some content, I noticed that the library seems to choke on this specific tag. Here's some code to reproduce it:

from selectolax.parser import HTMLParser
html = """test"""
tree = HTMLParser(html)
tree.unwrap_tags(["data"])

Output: Segmentation fault (core dumped)

I'm running selectolax==0.2.6 on Python 3.6.9

@rushter
Copy link
Owner

rushter commented Dec 19, 2020

I've fixed the problem in 0.2.10.
If you don't want to keep the content of the data tags, you need to use strip_tags.

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

2 participants