diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 00000000..16a22cba --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,22 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + pull_request: + +jobs: + maven-build: + runs-on: ubuntu-22.04 + steps: + - name: Git Checkout + uses: actions/checkout@v5 + - name: JDK 11 + uses: actions/setup-java@v2 + with: + java-version: 11 + - name: Build with Maven + env: + MAVEN_OPTS: -Djava.awt.headless=true -Dorg.slf4j.simpleLogger.defaultLogLevel=info -Dmaven.wagon.http.retryHandler.count=2 -Dmaven.wagon.http.pool=true + run: mvn clean install -Psnapshots -V -B diff --git a/api/pom.xml b/api/pom.xml index 79444a9c..0f584468 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -36,8 +36,8 @@ search-api - commons-lang - commons-lang + org.apache.commons + commons-lang3 org.projectlombok diff --git a/api/src/java/org/sakaiproject/clog/api/datamodel/Comment.java b/api/src/java/org/sakaiproject/clog/api/datamodel/Comment.java index 71859876..645638c5 100644 --- a/api/src/java/org/sakaiproject/clog/api/datamodel/Comment.java +++ b/api/src/java/org/sakaiproject/clog/api/datamodel/Comment.java @@ -20,7 +20,7 @@ import java.util.Date; import java.util.Stack; -import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.lang3.StringEscapeUtils; import org.sakaiproject.clog.api.ClogManager; import org.sakaiproject.clog.api.cover.SakaiProxy; import org.sakaiproject.entity.api.Entity; @@ -69,7 +69,7 @@ public void setContent(String text, boolean modified) { modifiedDate = new Date().getTime(); } - this.content = StringEscapeUtils.unescapeHtml(text.trim()); + this.content = StringEscapeUtils.unescapeHtml4(text.trim()); } public String getContent() { diff --git a/impl/pom.xml b/impl/pom.xml index 454767bb..3778194f 100644 --- a/impl/pom.xml +++ b/impl/pom.xml @@ -51,10 +51,6 @@ org.springframework spring-beans - - commons-lang - commons-lang - junit junit diff --git a/tool/pom.xml b/tool/pom.xml index 6b70e8b0..9c9223c7 100644 --- a/tool/pom.xml +++ b/tool/pom.xml @@ -56,22 +56,23 @@ javax.servlet-api - commons-lang - commons-lang + org.apache.commons + commons-lang3 org.projectlombok lombok - javax.servlet - jstl + jakarta.servlet.jsp.jstl + jakarta.servlet.jsp.jstl-api + ${sakai.jakarta.jstl-api.version} compile - taglibs - standard - 1.1.2 + org.apache.taglibs + taglibs-standard-impl + 1.2.5 compile diff --git a/tool/src/java/org/sakaiproject/clog/tool/ClogTool.java b/tool/src/java/org/sakaiproject/clog/tool/ClogTool.java index b04e906b..f0d4c768 100644 --- a/tool/src/java/org/sakaiproject/clog/tool/ClogTool.java +++ b/tool/src/java/org/sakaiproject/clog/tool/ClogTool.java @@ -9,7 +9,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.lang3.StringEscapeUtils; import org.sakaiproject.clog.api.ClogManager; import org.sakaiproject.clog.api.SakaiProxy; import org.sakaiproject.component.api.ComponentManager; @@ -107,7 +107,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response) t request.setAttribute("sakaiHtmlHead", (String) request.getAttribute("sakai.html.head")); request.setAttribute("userId", userId); - request.setAttribute("userDisplayName", StringEscapeUtils.escapeJavaScript(displayName)); + request.setAttribute("userDisplayName", StringEscapeUtils.escapeEcmaScript(displayName)); request.setAttribute("siteId", siteId); request.setAttribute("state", state); diff --git a/tool/src/webapp/WEB-INF/functions.tld b/tool/src/webapp/WEB-INF/functions.tld index f730b583..40c4c944 100644 --- a/tool/src/webapp/WEB-INF/functions.tld +++ b/tool/src/webapp/WEB-INF/functions.tld @@ -28,9 +28,7 @@ escapeJS - - - org.apache.commons.lang.StringEscapeUtils - java.lang.String escapeJavaScript(java.lang.String) + org.apache.commons.lang3.StringEscapeUtils + java.lang.String escapeEcmaScript(java.lang.String)