tid-kijyun / Kanna

Kanna(鉋) is an XML/HTML parser for Swift.
MIT License
2.42k stars 221 forks source link

Changed libxmlHTMLNode.swift #251

Closed krishjainx closed 3 years ago

krishjainx commented 3 years ago

To fix issue #242

tid-kijyun commented 3 years ago

Thank you for your PR. Unfortunately this patch doesn't seem to solve #242.

It still crashes with the following code.

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

This issue is a bit complicated so I'll fix it.

Thanks

KrishJain2 commented 3 years ago

@tid-kijyun Hi, could you explain how to solve this so I can try?

tid-kijyun commented 3 years ago

I've merged this PR with some additional fixes and test code. https://github.com/tid-kijyun/Kanna/commit/82695dcca3f4e9c8851f8dce962a02bfb1a765be @KrishJain2 If you need more information about the fix, see the comments above.

KrishJain2 commented 3 years ago

Ok, thank you. See my comment on your review of lines 145-148.

krishjainx commented 3 years ago

@tid-kijyun In https://github.com/tid-kijyun/Kanna/releases/tag/5.2.6 you might want to @Krish-sysadmin not @KrishJain2 . Thanks!