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

Crash when parsing HTML string with the value of " " #242

Closed
1 of 5 tasks
ivan-magda opened this issue Oct 22, 2020 · 5 comments
Closed
1 of 5 tasks

Crash when parsing HTML string with the value of " " #242

ivan-magda opened this issue Oct 22, 2020 · 5 comments

Comments

@ivan-magda
Copy link

Description:

With the latest release 5.2.3, I discovered crashes when parsing HTML:

Fatal error: Unexpectedly found nil while implicitly unwrapping an 
Optional value: file Kanna/libxmlHTMLNode.swift, line 144

Code to reproduce:

try? Kanna.HTML(html: " ", encoding: String.Encoding.utf8)

Installation method:

  • Carthage
  • CocoaPods
  • Swift Package Manager
  • Manually
  • other: ()

Kanna version (or commit hash):

5.2.3

swift --version

5.3

Xcode version (optional):

12.0.1

@krishjainx
Copy link
Contributor

krishjainx commented Jul 16, 2021

@ivan-magda I think I can fix this. It simply involves modifying the libxmlHTMLNode.swift file. Can this be assigned to me?

@tid-kijyun
Copy link
Owner

I'm sorry I missed this report.
@Krish-sysadmin Please make a PR if possible.

Thanks

@krishjainx
Copy link
Contributor

Ok @tid-kijyun . Will make it as soon as I am free. Thanks for providing such an amazing parser!

@krishjainx
Copy link
Contributor

I submitted a PR @tid-kijyun

@tid-kijyun
Copy link
Owner

I've just released new version 5.2.6. Please try it.

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

3 participants