Skip to content

Commit

Permalink
fix(hal browser): fix xss vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed May 13, 2020
1 parent a79ad29 commit ac56441
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vendor/hal-browser/browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ <h2>Links</h2>
<% if ($.isArray(obj)) { %>
<% _.each(obj, function(link, i) { %>
<tr>
<!-- pact_broker escaping -->
<td><strong><%= HAL.truncateIfUrl(rel) %></strong></td>
<td><%= link.title || '' %></td>
<td><%= link.name ? 'name: ' + link.name : 'index: ' + i %></a></td>
<td><%- link.title || '' %></td>
<td><%- link.name ? 'name: ' + link.name : 'index: ' + i %></a></td>
<td>
<% if (HAL.isUrl(rel)) { %>
<a class="dox" href="<%= HAL.normalizeUrl(HAL.buildUrl(rel)) %>"><i class="icon-book"></i></a>
Expand All @@ -86,8 +87,9 @@ <h2>Links</h2>
<% } else { %>
<tr>
<td><strong><%= HAL.truncateIfUrl(rel) %></strong></td>
<td><%= obj.title || '' %></td>
<td><%= obj.name || '' %></td>
<!-- pact_broker escaping -->
<td><%- obj.title || '' %></td>
<td><%- obj.name || '' %></td>
<td>
<% if (HAL.isUrl(rel)) { %>
<a class="dox" href="<%= HAL.normalizeUrl(HAL.buildUrl(rel)) %>"><i class="icon-book"></i></a>
Expand Down

0 comments on commit ac56441

Please sign in to comment.