Workaround for del tag parsing in comments

This commit is contained in:
FooIbar authored and tarsin committed 2023-02-20 14:56:29 +08:00
1 parent bf651c7e40
commit 4a6b85003a
1 file changed
+2 -1
@@ -92,7 +92,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)