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

find/2 gets stuck with non-HTML input #17

Closed
uasi opened this issue Aug 20, 2015 · 2 comments
Closed

find/2 gets stuck with non-HTML input #17

uasi opened this issue Aug 20, 2015 · 2 comments
Labels

Comments

@uasi
Copy link

uasi commented Aug 20, 2015

# These call never return
Floki.find("", "a")
Floki.find("foobar", "a")
Floki.find("foobar<", "a")

# find/2 wants at least one tag
Floki.find("foobar<a>", "a")  # => [{"a", [], []}]

# To be precise, it's ok if input matches /<[a-zA-Z0-9]/
Floki.find("foobar<a", "a")   # => []
@philss
Copy link
Owner

philss commented Aug 21, 2015

@uasi Interesting. I think this is something related to the search step, since the parse works fine. I will take a look soon.

Thanks for reporting!

philss added a commit that referenced this issue Aug 23, 2015
This commit closes the issue #17. It also includes a refactor to
organize the code. It only moves related things to its modules.
@philss philss added the Bug label Aug 23, 2015
@philss
Copy link
Owner

philss commented Aug 23, 2015

Hi @uasi, this bug was solved in 4cde3f4. It is already available as a new hex package version. Please update your mix.exs to use version 0.3.3. Don't forget to run mix deps.update floki.

Thanks!

@philss philss closed this as completed Aug 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants