/src/main/java/org/htmlunit/html/HtmlPage.java
} scriptEncoding = contentCharset;ignoreBom = true;
ignoreBom = true; scriptEncoding = contentCharset; }
} } else if (ISO_8859_1 == contentCharset) { ignoreBom = true; } else { <extra_id_0> final String scriptCode = response.getContentAsString(scriptEncoding, ignoreBom && getWebClient().getBrowserVersion().hasFeature(JS_IGNORES_UTF8_BOM_SOMETIMES)); if (null != scriptCode) { final AbstractJavaScriptEngine<?> javaScriptEngine = client.getJavaScriptEngine(); final Object script = javaScriptEngine.compile(this, scriptCode, url.toExternalForm(), 1);