+ "<div><script>a()</script>Hello <script>b()</script>World!!!</div>\n"
+ "<h1>Foo <b><script>c()</script>Bar</b> Baz</h1>\n"
+ "<h2 id='x'>Boo</h2>\n");
PluginMeta meta = new PluginMeta();
List<ScriptPlaceholder> extractedScripts = Lists.newArrayList();
TemplateCompiler tc = new TemplateCompiler(
Collections.singletonList(new IhtmlRoot(
new JobEnvelope(
null, JobCache.none(), ContentType.HTML, false, null),
htmlWithScriptsExtracted(input, extractedScripts), is.getUri())),
Collections.<ValidatedStylesheet>emptyList(), extractedScripts,
CssSchema.getDefaultCss21Schema(mq), HtmlSchema.getDefault(mq),
meta, mc, mq);
Pair<List<SafeHtmlChunk>, List<SafeJsChunk>> htmlAndJs = tc.getSafeHtml(
DomParser.makeDocument(null, null));
assertEquals(
""
+ "<p>Hi</p>"