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

Missing text in innerHTML #59

Closed
PMStanley opened this issue Mar 1, 2016 · 0 comments
Closed

Missing text in innerHTML #59

PMStanley opened this issue Mar 1, 2016 · 0 comments

Comments

@PMStanley
Copy link

Just had a bug report in my app that uses Kanna where text is missing from a page that's been parsed. It appears that a long line of text ending in <br><br> is missing from the innerHTML string.

if let doc = Kanna.HTML(html: data!, encoding: NSUTF8StringEncoding){
  for articleParagraphs in node.css("p") {
    if articleParagraphs.className == "small" {
      print("StarDate: " + articleParagraphs.text!)
  } else {
      print("Article: " + articleParagraphs.innerHTML!)
  }
}

Example can be found here

Expected result:

Last month, the eminent scientist Ishmael Palin...

Actual result:

Since then, certain sections of the galactic...

articleParagraphs.text shows that the all of the expected text is present and it appears to be an issue with the string returned by articleParagraphs.innerHTML

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

1 participant