Skip to content

Commit 5a5b3da

Browse files
committed
fixed tests
1 parent 580da81 commit 5a5b3da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aztec/src/main/kotlin/org/wordpress/aztec/util/CleaningUtils.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package org.wordpress.aztec.util
22

33
import org.jsoup.Jsoup
44
import org.jsoup.nodes.Document
5+
import org.jsoup.parser.Parser
56

67
object CleaningUtils {
78

@@ -20,7 +21,7 @@ object CleaningUtils {
2021

2122
@JvmStatic
2223
fun cleanNestedBoldTags(html: String) : String {
23-
val doc = Jsoup.parseBodyFragment(html).outputSettings(Document.OutputSettings())
24+
val doc = Jsoup.parse(html, "", Parser.xmlParser()).outputSettings(Document.OutputSettings().prettyPrint(false))
2425
cleanNestedBoldTags(doc)
2526
return doc.html()
2627
}

0 commit comments

Comments
 (0)