Only apply HTML cleaning when response has Content-Type=text/html

This commit is contained in:
Arjan Schrijver
2025-12-25 14:45:08 +01:00
committed by Arjan Schrijver
parent 693c2d9e77
commit c0a467d0d6
@@ -107,7 +107,7 @@ object InternetHelperSingleton {
val contentType = response.headers["content-type"]
?.substringBefore(";")
?.trim()
?: "text/html"
?: "application/octet-stream"
val encoding = response.headers["content-encoding"] ?: "UTF-8"
val inputStream = ParcelFileDescriptor.AutoCloseInputStream(response.body)