Skip to content

Commit

Permalink
Got back to trimmedComponent and added toString
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahad Mammadov committed Dec 5, 2024
1 parent b2bebb6 commit 8f5b26a
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ THE SOFTWARE.
</thead>
<j:forEach var="f" items="${it.failedTests}" varStatus="i">
<tr>
<j:set var="rawPath" value="${f.getRelativePathFrom(it)}" />
<j:set var="encodedRelativePath">
<j:forEach items="${f.getRelativePathFrom(it).split('/')}" var="component" varStatus="i">
<j:invokeStatic var="encodedComponent" className="java.net.URLEncoder" method="encode">
<j:arg value="${component}" />
<j:arg value="UTF-8" />
<j:forEach items="${rawPath.split('/')}" var="component" varStatus="i">
<j:trim var="trimmedComponent" value="${component}" />
<j:invokeStatic var="encodedComponent" className="hudson.Util" method="rawEncode">
<j:arg value="${trimmedComponent.toString()}" />
</j:invokeStatic>
<j:if test="${i.index > 0}">/</j:if>${encodedComponent}
</j:forEach>
Expand Down

0 comments on commit 8f5b26a

Please sign in to comment.