The Scala xml parser is complaining that your template is not valid xml. You can try setting
LiftRules.htmlProperties.default.set((r: Req) =>
new Html5Properties(r.userAgent))
Which will use an HTML5 parser instead, or you can work out the xml issues. It could be that your script contents aren't wrapped in CDATA blocks. To make them valid xml use:
<script>
<![CDATA[
// your script contents
]]>
</script>
That will indicate to the xml parser that what falls between the script tags is non-xml character data and shouldn't be parsed.