Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5baa998 authored by cketti's avatar cketti
Browse files

Update Jsoup to version 1.14.3

parent e1635a2a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
package com.fsck.k9.message.html

import org.jsoup.Jsoup
import org.jsoup.safety.Whitelist as AllowList
import org.jsoup.safety.Safelist

object HtmlHelper {
    @JvmStatic
    fun extractText(html: String): String {
        return Jsoup.clean(html, AllowList.none())
        return Jsoup.clean(html, Safelist.none())
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ package app.k9mail.html.cleaner

import org.jsoup.nodes.Document
import org.jsoup.safety.Cleaner
import org.jsoup.safety.Whitelist as AllowList
import org.jsoup.safety.Safelist

internal class BodyCleaner {
    private val cleaner: Cleaner
@@ -12,7 +12,7 @@ internal class BodyCleaner {
    )

    init {
        val allowList = AllowList.relaxed()
        val allowList = Safelist.relaxed()
            .addTags("font", "hr", "ins", "del", "center", "map", "area", "title")
            .addAttributes("font", "color", "face", "size")
            .addAttributes(
+3 −3
Original line number Diff line number Diff line
@@ -54,12 +54,12 @@ internal class CleaningVisitor(
        if (source === elementToSkip) {
            elementToSkip = null
        } else if (source is Element && isSafeTag(source)) {
            destination = destination.parent()
            destination = destination.parent() ?: error("Missing parent")
        }
    }

    private fun isSafeTag(node: Node): Boolean {
        if (isMetaRefresh(node)) return false
    private fun isSafeTag(node: Node?): Boolean {
        if (node == null || isMetaRefresh(node)) return false

        val tag = node.nodeName().lowercase()
        return tag in ALLOWED_TAGS
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ buildscript {
                'okhttp': '4.9.3',
                'minidns': '1.0.3',
                'glide': '4.13.1',
                'jsoup': '1.13.1',
                'jsoup': '1.14.3',

                'androidxTestRunner': '1.4.0',
                'junit': '4.13.2',