[API/Mobidziennik] Fix duplicated line breaks when getting message.

This commit is contained in:
Kuba Szczodrzyński 2020-03-12 13:55:02 +01:00
parent af3b6f3a97
commit 6ec2bc6f21
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ class MobidziennikWebGetMessage(override val data: DataMobidziennik,
// this needs to be at the end
message.apply {
this.body = body.html().replace("\n", "<br>")
this.body = body.html()
clearAttachments()
content.select("ul li").map { it.select("a").first() }.forEach {

View File

@ -203,7 +203,7 @@ object MessagesUtils {
}
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Html.fromHtml(text, Html.FROM_HTML_MODE_COMPACT)
Html.fromHtml(text, Html.FROM_HTML_MODE_LEGACY)
} else {
Html.fromHtml(text)
}