Merge pull request #5942 from k9mail/update_dependencies

Update dependencies
This commit is contained in:
cketti 2022-03-04 21:31:30 +01:00 committed by GitHub
commit 604873b659
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 32 additions and 34 deletions

View file

@ -1,11 +1,11 @@
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())
}
}

View file

@ -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(

View file

@ -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

View file

@ -7,8 +7,8 @@ dependencies {
api "androidx.appcompat:appcompat:${versions.androidxAppCompat}"
api "androidx.activity:activity:${versions.androidxActivity}"
api "com.google.android.material:material:${versions.materialComponents}"
api "androidx.navigation:navigation-fragment-ktx:${versions.androidxNavigation}"
api "androidx.navigation:navigation-ui-ktx:${versions.androidxNavigation}"
api "androidx.navigation:navigation-fragment:${versions.androidxNavigation}"
api "androidx.navigation:navigation-ui:${versions.androidxNavigation}"
api "androidx.lifecycle:lifecycle-livedata-ktx:${versions.androidxLifecycle}"
implementation "androidx.core:core-ktx:${versions.androidxCore}"

View file

@ -32,10 +32,10 @@ dependencies {
implementation "de.cketti.library.changelog:ckchangelog-core:2.0.0-beta02"
implementation "com.splitwise:tokenautocomplete:4.0.0-beta01"
implementation "de.cketti.safecontentresolver:safe-content-resolver-v21:1.0.0"
implementation 'com.mikepenz:materialdrawer:8.4.1'
implementation 'com.mikepenz:materialdrawer-iconics:8.3.3'
implementation 'com.mikepenz:materialdrawer:8.4.5'
implementation 'com.mikepenz:materialdrawer-iconics:8.4.5'
implementation 'com.mikepenz:fontawesome-typeface:5.9.0.0-kotlin@aar'
implementation 'com.github.ByteHamster:SearchPreference:v2.0.0'
implementation 'com.github.ByteHamster:SearchPreference:v2.1.0'
implementation "com.mikepenz:fastadapter:${versions.fastAdapter}"
implementation "com.mikepenz:fastadapter-extensions-drag:${versions.fastAdapter}"
implementation "com.mikepenz:fastadapter-extensions-utils:${versions.fastAdapter}"

View file

@ -65,7 +65,7 @@ constructor(
isEnabled = true
}
override fun getSummary(): CharSequence {
override fun getSummary(): CharSequence? {
// While folders are being loaded the summary returned by ListPreference will be empty. This leads to the
// summary view being hidden. Once folders are loaded the summary updates and the list height changes. This
// adds quite a bit of visual clutter. We avoid that by returning a placeholder summary value.

View file

@ -16,7 +16,6 @@ import com.fsck.k9.ui.R
import com.fsck.k9.ui.base.K9Activity
import com.fsck.k9.ui.fragmentTransaction
import com.fsck.k9.ui.fragmentTransactionWithBackStack
import com.fsck.k9.ui.resolveColorAttribute
class GeneralSettingsActivity : K9Activity(), OnPreferenceStartScreenCallback, SearchPreferenceResultListener {
private lateinit var searchPreferenceActionView: SearchPreferenceActionView
@ -63,8 +62,7 @@ class GeneralSettingsActivity : K9Activity(), OnPreferenceStartScreenCallback, S
replace(R.id.generalSettingsContainer, fragment)
}
val accentColor = theme.resolveColorAttribute(R.attr.colorAccent)
result.highlight(fragment as PreferenceFragmentCompat, accentColor)
result.highlight(fragment as PreferenceFragmentCompat)
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {

View file

@ -13,39 +13,39 @@ buildscript {
versions = [
'kotlin': '1.6.10',
'kotlinCoroutines': '1.6.0',
'androidxAppCompat': '1.3.1',
'androidxAppCompat': '1.4.1',
'androidxActivity': '1.4.0',
'androidxRecyclerView': '1.2.1',
'androidxLifecycle': '2.4.0',
'androidxAnnotation': '1.2.0',
'androidxLifecycle': '2.4.1',
'androidxAnnotation': '1.3.0',
'androidxBiometric': '1.1.0',
'androidxNavigation': '2.3.5',
'androidxConstraintLayout': '2.1.1',
'androidxWorkManager': '2.7.0',
'androidxFragment': '1.3.6',
'androidxLocalBroadcastManager': '1.0.0',
'androidxNavigation': '2.4.1',
'androidxConstraintLayout': '2.1.3',
'androidxWorkManager': '2.7.1',
'androidxFragment': '1.4.1',
'androidxLocalBroadcastManager': '1.1.0',
'androidxCore': '1.7.0',
'androidxCardView': '1.0.0',
'androidxPreference': '1.1.1',
'androidxPreference': '1.2.0',
'androidxTestCore': '1.4.0',
'materialComponents': '1.4.0',
'fastAdapter': '5.5.1',
'materialComponents': '1.5.0',
'fastAdapter': '5.6.0',
'preferencesFix': '1.1.0',
'okio': '2.10.0',
'okio': '3.0.0',
'moshi': '1.13.0',
'timber': '5.0.1',
'koin': '3.1.3',
'koin': '3.1.5',
'commonsIo': '2.6',
'mime4j': '0.8.6',
'okhttp': '4.9.2',
'minidns': '1.0.0',
'glide': '4.12.0',
'jsoup': '1.13.1',
'okhttp': '4.9.3',
'minidns': '1.0.3',
'glide': '4.13.1',
'jsoup': '1.14.3',
'androidxTestRunner': '1.4.0',
'junit': '4.13.2',
'robolectric': '4.7.3',
'mockito': '4.0.0',
'mockito': '4.3.1',
'mockitoKotlin': '4.0.0',
'truth': '1.1.3',
'turbine': '0.7.0',