NightWhistler / HtmlSpanner

Android HTML rendering library with CSS support
http://nightwhistler.github.io/HtmlSpanner/
875 stars 208 forks source link

Doesn't work with HtmlCleaner 2.4 #8

Closed itsnottakenme closed 8 years ago

itsnottakenme commented 11 years ago

Just thought you might want to add it to the documentation.

I kept getting blank output when trying to use HtmlSpanner with HtmlCleaner 2.4

Works perfect with HtmlCleaner 2.2 though

NightWhistler commented 11 years ago

OK, very interesting... I wonder if HtmlCleaner 2.4 changed the API in some way that breaks HtmlSpanner.

NightWhistler commented 11 years ago

I looked into this, and HtmlCleaner 2.4 changed the semantics of the getChildren() call... the call itself has been deprecated and now delegates to getChildTags(), which only returns TagNodes and not ContentNodes.

It looks like they want you to use getText() now, but that recurses the tree, which is not something I want for HtmlSpanner... I'll have to see how I can properly get the content-nodes now.

fbvictorhugo commented 9 years ago

@NightWhistler any solution ?

Doesn't work with HtmlCleaner 2.12, the text isn't appear.

philomates commented 8 years ago

@NightWhistler bump to check if you have intentions of ever addressing this.

It looks like @sdcr has a fork that is compatible with HtmlCleaner 2.4 and above: https://github.com/sdcr/HtmlSpanner (see commit https://github.com/sdcr/HtmlSpanner/commit/c01045c681deecaa5642c0d99276b6df302bd963)

NightWhistler commented 8 years ago

It wasn't really high on my priority list, but it looks like the fixes that sdcr made should be easy enough to port back. I'll see if he's willing to send me a pull request. Thanks for the heads-up!

NightWhistler commented 8 years ago

Got a pull-request and just merged it, which should fix this issue.