Skip to content

Commit

Permalink
Fix for decodeEntities when parsing an html string in parts
Browse files Browse the repository at this point in the history
  • Loading branch information
koalas11 authored Dec 14, 2023
1 parent 7b3af49 commit 4137b37
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 4137b37

Please sign in to comment.