[Mangadex] Call removeEntitiesAndMarkdown on desc before appending altTitles to it (#16711)

* [Mangadex] Call removeEntitiesAndMarkdown on desc before appending altTitles to it

* Bump extVersionCode
This commit is contained in:
FlaminSarge 2023-06-11 05:14:00 -07:00 committed by GitHub
parent d9ea955199
commit 0e8aad3b9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'MangaDex'
pkgNameSuffix = 'all.mangadex'
extClass = '.MangaDexFactory'
extVersionCode = 179
extVersionCode = 180
isNsfw = true
}

View File

@ -335,7 +335,7 @@ class MangaDexHelper(lang: String) {
val genreList = MDConstants.tagGroupsOrder.flatMap { genresMap[it].orEmpty() } + nonGenres
var desc = attr.description[lang] ?: attr.description["en"] ?: ""
var desc = (attr.description[lang] ?: attr.description["en"] ?: "").removeEntitiesAndMarkdown()
if (altTitlesInDesc) {
val romanizedOriginalLang = MDConstants.romanizedLangCodes[attr.originalLanguage] ?: ""
@ -343,12 +343,12 @@ class MangaDexHelper(lang: String) {
.mapNotNull { it.values.singleOrNull() }
if (altTitles.isNotEmpty()) {
val altTitlesDesc = intl.altTitleText + altTitles.joinToString("\n", "\n")
desc += (if (desc.isNullOrBlank()) "" else "\n\n") + altTitlesDesc
desc += (if (desc.isNullOrBlank()) "" else "\n\n") + altTitlesDesc.removeEntitiesAndMarkdown()
}
}
return createBasicManga(mangaDataDto, coverFileName, coverSuffix, lang).apply {
description = desc.removeEntitiesAndMarkdown()
description = desc
author = authors.joinToString(", ")
artist = artists.joinToString(", ")
status = getPublicationStatus(attr, chapters)