MohamedRejeb / Ksoup

Ksoup is a lightweight Kotlin Multiplatform library for parsing HTML, extracting HTML tags, attributes, and text, and encoding and decoding HTML entities.
Apache License 2.0
376 stars 10 forks source link

Decoder is failing to decode ’ #25

Closed spacecowboy closed 11 months ago

spacecowboy commented 1 year ago

Example test

class KsoupTest {
    @Test
    fun rsquo() {
        val text = "laptop, it’s probably"
        val expected = "laptop, it’s probably"

        assertEquals(expected, KsoupEntities.decodeHtml(text))
    }
}

Output:

Expected :laptop, it’s probably
Actual   :laptop, it’s probably
spacecowboy commented 1 year ago

I should also mention that I'm using version 1.x because I can't upgrade kotlin yet (Android restrictions)

MohamedRejeb commented 1 year ago

The problem is fixed in 0.2.1, I will try to publish a new release 0.1.5 for kotlin 1.8.x