Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Ensure UTF-8 when reading commonmark.min.js
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed May 25, 2015
1 parent ee7b454 commit 55697bc
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -35,6 +35,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;

/**
* @author Sean Flanigan <a href="mailto:sflaniga@redhat.com">sflaniga@redhat.com</a>
Expand Down Expand Up @@ -90,7 +91,7 @@ public synchronized String renderToHtmlUnsafe(String commonMark) {

private Invocable getInvocable() {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(
getScriptAsStream(getScriptName())))) {
getScriptAsStream(getScriptName()), StandardCharsets.UTF_8))) {

ScriptEngine engine = newEngine();
engine.eval("window = this;");
Expand Down

0 comments on commit 55697bc

Please sign in to comment.