Workaround for del tag parsing in comments

This commit is contained in:
FooIbar authored and tarsin committed 2023-02-20 18:48:40 +08:00
1 parent 9fd3196bb1
commit 9a773aeb39
1 file changed
+2 -1
@@ -91,7 +91,8 @@ object GalleryDetailParser {
// Error info
PATTERN_ERROR.find(body)?.run { throw EhException(groupValues[1]) }
val galleryDetail = GalleryDetail()
val document = Jsoup.parse(body)
// Temporary workaround, see https://github.com/jhy/jsoup/issues/1850
val document = Jsoup.parse(body.replace("del>", "s>"))
parseDetail(galleryDetail, document, body)
galleryDetail.tags = parseTagGroups(document)
galleryDetail.comments = parseComments(document)