Skip to content

Commit

Permalink
Merge pull request #37 from koalas11/patch-1
Browse files Browse the repository at this point in the history
Fix for decodeEntities when parsing an html string in parts
  • Loading branch information
MohamedRejeb authored Dec 20, 2023
2 parents 7b3af49 + 4137b37 commit 3714047
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ internal class KsoupTokenizer(
private fun stateInEntity(c: Int) {
if (c == CharCodes.Semi.code) {
val decoded = KsoupEntities.decodeHtml(
this.buffer.substring(this.entityStart, this.index + 1)
this.buffer.substring(this.entityStart - this.offset, this.index - this.offset + 1)
)

this.state = this.baseState
Expand Down Expand Up @@ -874,4 +874,4 @@ internal class KsoupTokenizer(
}
}

}
}

0 comments on commit 3714047

Please sign in to comment.