Skip to content

The Unified and Autonomous Development Platform

midwork

robin shinedf47b1390c3b
diff --git a/commons.wicket/pom.xml b/commons.wicket/pom.xml
index 6b6cb4a2f7..32d9d21f63 100644
--- a/commons.wicket/pom.xml
+++ b/commons.wicket/pom.xml
@@ -118,7 +118,7 @@
</dependencies>
<properties>
<moduleClass>com.pmease.commons.wicket.WicketModule</moduleClass>
- <wicketVersion>7.2.0</wicketVersion>
+ <wicketVersion>7.3.0-SNAPSHOT</wicketVersion>
<wicketBootstrapVersion>0.10.6</wicketBootstrapVersion>
</properties>
<repositories>
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/blobview/source/SourceViewPanel.java b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/blobview/source/SourceViewPanel.java
index 534b3edc68..a14da75668 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/blobview/source/SourceViewPanel.java
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/blobview/source/SourceViewPanel.java
@@ -6,7 +6,6 @@ import java.util.List;
import javax.annotation.Nullable;
import javax.servlet.http.Cookie;
-import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
@@ -27,6 +26,7 @@ import org.eclipse.jgit.lib.FileMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.unbescape.html.HtmlEscape;
+import org.unbescape.javascript.JavaScriptEscape;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -257,8 +257,8 @@ public class SourceViewPanel extends BlobViewPanel {
String script = String.format("gitplex.sourceview.init('%s', '%s', '%s', %s, '%s', '%s', %s, %s);",
codeContainer.getMarkupId(),
- StringEscapeUtils.escapeEcmaScript(blob.getText().getContent()),
- context.getBlobIdent().path,
+ JavaScriptEscape.escapeJavaScript(blob.getText().getContent()),
+ JavaScriptEscape.escapeJavaScript(context.getBlobIdent().path),
context.getMark()!=null?context.getMark().toJSON():"undefined",
symbolTooltip.getMarkupId(),
context.getBlobIdent().revision,