mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 12:15:50 +00:00
used tag c:out for EL to prevent HTML injection
This commit is contained in:
parent
d88b565d28
commit
95cb32d86d
3 changed files with 16 additions and 16 deletions
|
@ -17,19 +17,19 @@
|
||||||
<table class="table table-striped" style="width:600px;">
|
<table class="table table-striped" style="width:600px;">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<td><b>${owner.firstName} ${owner.lastName}</b></td>
|
<td><b><c:out value="${owner.firstName} ${owner.lastName}"/></b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Address</th>
|
<th>Address</th>
|
||||||
<td>${owner.address}</td>
|
<td><c:out value="${owner.address}"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>City</th>
|
<th>City</th>
|
||||||
<td>${owner.city}</td>
|
<td><c:out value="${owner.city}"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Telephone </th>
|
<th>Telephone </th>
|
||||||
<td>${owner.telephone}</td>
|
<td><c:out value="${owner.telephone}"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table class="table-buttons">
|
<table class="table-buttons">
|
||||||
|
@ -57,11 +57,11 @@
|
||||||
<td valign="top" style="width: 120px;">
|
<td valign="top" style="width: 120px;">
|
||||||
<dl class="dl-horizontal">
|
<dl class="dl-horizontal">
|
||||||
<dt>Name</dt>
|
<dt>Name</dt>
|
||||||
<dd>${pet.name}</dd>
|
<dd><c:out value="${pet.name}"/></dd>
|
||||||
<dt>Birth Date</dt>
|
<dt>Birth Date</dt>
|
||||||
<dd><joda:format value="${pet.birthDate}" pattern="yyyy-MM-dd" /></dd>
|
<dd><joda:format value="${pet.birthDate}" pattern="yyyy-MM-dd" /></dd>
|
||||||
<dt>Type</dt>
|
<dt>Type</dt>
|
||||||
<dd>${pet.type.name}</dd>
|
<dd><c:out value="${pet.type.name}"/></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
<c:forEach var="visit" items="${pet.visits}">
|
<c:forEach var="visit" items="${pet.visits}">
|
||||||
<tr>
|
<tr>
|
||||||
<td><joda:format value="${visit.date}" pattern="yyyy-MM-dd"/></td>
|
<td><joda:format value="${visit.date}" pattern="yyyy-MM-dd"/></td>
|
||||||
<td>${visit.description}</td>
|
<td><c:out value="${visit.description}"/></td>
|
||||||
</tr>
|
</tr>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -29,14 +29,14 @@
|
||||||
<spring:url value="owners/{ownerId}.html" var="ownerUrl">
|
<spring:url value="owners/{ownerId}.html" var="ownerUrl">
|
||||||
<spring:param name="ownerId" value="${owner.id}"/>
|
<spring:param name="ownerId" value="${owner.id}"/>
|
||||||
</spring:url>
|
</spring:url>
|
||||||
<a href="${fn:escapeXml(ownerUrl)}">${owner.firstName} ${owner.lastName}</a>
|
<a href="${fn:escapeXml(ownerUrl)}"><c:out value="${owner.firstName} ${owner.lastName}" /></a>
|
||||||
</td>
|
</td>
|
||||||
<td>${owner.address}</td>
|
<td><c:out value="${owner.address}"/></td>
|
||||||
<td>${owner.city}</td>
|
<td><c:out value="${owner.city}"/></td>
|
||||||
<td>${owner.telephone}</td>
|
<td><c:out value="${owner.telephone}"/></td>
|
||||||
<td>
|
<td>
|
||||||
<c:forEach var="pet" items="${owner.pets}">
|
<c:forEach var="pet" items="${owner.pets}">
|
||||||
${pet.name}
|
<c:out value="${pet.name}"/>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -25,10 +25,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>${visit.pet.name}</td>
|
<td><c:out value="${visit.pet.name}" /></td>
|
||||||
<td><joda:format value="${visit.pet.birthDate}" pattern="yyyy-MM-dd"/></td>
|
<td><joda:format value="${visit.pet.birthDate}" pattern="yyyy-MM-dd"/></td>
|
||||||
<td>${visit.pet.type.name}</td>
|
<td><c:out value="${visit.pet.type.name}" /></td>
|
||||||
<td>${visit.pet.owner.firstName} ${visit.pet.owner.lastName}</td>
|
<td><c:out value="${visit.pet.owner.firstName} ${visit.pet.owner.lastName}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
<c:if test="${!visit['new']}">
|
<c:if test="${!visit['new']}">
|
||||||
<tr>
|
<tr>
|
||||||
<td><joda:format value="${visit.date}" pattern="yyyy-MM-dd"/></td>
|
<td><joda:format value="${visit.date}" pattern="yyyy-MM-dd"/></td>
|
||||||
<td>${visit.description}</td>
|
<td><c:out value="${visit.description}" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</c:if>
|
</c:if>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
|
|
Loading…
Reference in a new issue