Skip to content

Commit

Permalink
Use Util#rawEncode to encode URLs (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Nov 9, 2024
1 parent b90591b commit 0078bfe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/main/resources/hudson/tasks/junit/ClassResult/body.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ THE SOFTWARE.
<j:forEach var="p" items="${it.children}" varStatus="status">
<tr>
<td class="pane">
<a href="${h.urlEncode(p.safeName)}"><span style="${p.previousResult==null?'font-weight:bold':''}"><st:out value="${p.displayName}" /></span></a>
<j:invokeStatic var="encodedSafeName" className="hudson.Util" method="rawEncode">
<j:arg value="${p.safeName}" />
</j:invokeStatic>
<a href="${encodedSafeName}"><span style="${p.previousResult==null?'font-weight:bold':''}"><st:out value="${p.displayName}" /></span></a>
<j:forEach var="badge" items="${p.testActions}">
<st:include it="${badge}" page="badge.jelly" optional="true"/>
</j:forEach>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ THE SOFTWARE.
<j:set var="prev" value="${prevAll.findCorrespondingResult(p.id)}" />
<tr>
<td class="pane">
<a href="${h.urlEncode(p.safeName)}/" class="body.jelly"><span style="${prev==null?'font-weight:bold':''}"><st:out value="${p.displayName}" /></span></a>
<j:invokeStatic var="encodedSafeName" className="hudson.Util" method="rawEncode">
<j:arg value="${p.safeName}" />
</j:invokeStatic>
<a href="${encodedSafeName}/" class="body.jelly"><span style="${prev==null?'font-weight:bold':''}"><st:out value="${p.displayName}" /></span></a>
<j:forEach var="badge" items="${p.testActions}">
<st:include it="${badge}" page="badge.jelly" optional="true"/>
</j:forEach>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ THE SOFTWARE.
<j:set var="prev" value="${p.previousResult}" />
<tr>
<td class="pane">
<a href="${h.urlEncode(p.safeName)}/"><span style='${prev==null?"font-weight:bold":""}'>${p.name}</span></a>
<j:invokeStatic var="encodedSafeName" className="hudson.Util" method="rawEncode">
<j:arg value="${p.safeName}" />
</j:invokeStatic>
<a href="${encodedSafeName}/"><span style='${prev==null?"font-weight:bold":""}'>${p.name}</span></a>
<st:nbsp/>
<j:forEach var="badge" items="${p.testActions}">
<st:include it="${badge}" page="badge.jelly" optional="true"/>
Expand Down

0 comments on commit 0078bfe

Please sign in to comment.