-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Description
the documentation (https://github.com/kotlin/kotlinx.html/wiki/Style-and-script-tags) says that it should be possible to insert raw content into a script tag.
This does not seem to work if I'm using the createHTMLDocument builder as then the inserted "raw" content needs to be valid XML. The example below causes a SAXParseException.
val html = createHTMLDocument().body {
script(type = ScriptType.textJScript) {
unsafe {
raw("""
function my() {return 1;}
""")
}
}
}.serialize(true)
Is this intended?
I also setup a sample project to demonstrate the issue: https://github.com/abendt/kotlin-html-jscript/blob/master/src/test/kotlin/HtmlScriptTest.kt