From bb827638c0405808da70165cfdbb6c3868474e38 Mon Sep 17 00:00:00 2001 From: Username404 Date: Sun, 20 Jun 2021 22:22:15 +0200 Subject: [PATCH] Use outerHTML instead of innerHTML in Subpage.kt --- src/main/kotlin/fr/username404/website/subpages/Subpage.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/fr/username404/website/subpages/Subpage.kt b/src/main/kotlin/fr/username404/website/subpages/Subpage.kt index 313a895..26cc744 100644 --- a/src/main/kotlin/fr/username404/website/subpages/Subpage.kt +++ b/src/main/kotlin/fr/username404/website/subpages/Subpage.kt @@ -14,8 +14,8 @@ data class Subpage( ) { fun open(): Document = window.document.open( type = "text/html", - replace = (head.map { it.innerHTML }.reduceOrNull { previous, current -> previous + '\n' + current } ?: "").plus( - '\n' + content.innerHTML + replace = (head.map { it.outerHTML }.reduceOrNull { previous, current -> previous + '\n' + current } ?: "").plus( + '\n' + content.outerHTML ) ) }