THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

markdown: Use rhino markdown render instead of nashorn

pull/92/head
Suwon Chae 4 years ago
parent
commit
4666451e4d
3 changed files with 4 additions and 3 deletions
  1. +2
    -2
      app/utils/Markdown.java
  2. +2
    -1
      build.sbt
  3. BIN
      lib/js-engine.jar

+ 2
- 2
app/utils/Markdown.java View File

@ -45,10 +45,10 @@ public class Markdown {
private static ScriptEngine engine = buildEngine();
private static ScriptEngine buildEngine() {
ScriptEngineManager manager = new ScriptEngineManager(null);
ScriptEngineManager manager = new ScriptEngineManager();
InputStream is = null;
Reader reader = null;
ScriptEngine _engine = manager.getEngineByName("JavaScript");
ScriptEngine _engine = manager.getEngineByName("rhino");
try {
is = Thread.currentThread().getContextClassLoader().getResourceAsStream(XSS_JS_FILE);

+ 2
- 1
build.sbt View File

@ -47,7 +47,8 @@ libraryDependencies ++= Seq(
"com.github.zafarkhaja" % "java-semver" % "0.7.2",
"com.google.guava" % "guava" % "19.0",
"com.googlecode.htmlcompressor" % "htmlcompressor" % "1.4",
"org.springframework" % "spring-jdbc" % "4.1.5.RELEASE"
"org.springframework" % "spring-jdbc" % "4.1.5.RELEASE",
"org.mozilla" % "rhino" % "1.7.7.1"
)
val projectSettings = Seq(

BIN
lib/js-engine.jar View File


Loading…
Cancel
Save