Skip to content

Commit

Permalink
fix: escape html on index pages
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Apr 1, 2019
1 parent 38b3777 commit 6ee34af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/pact_broker/ui/views/index/show-with-tags.haml
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,30 @@
%tr
%td.consumer
%a{:href => index_item.consumer_group_url }
= index_item.consumer_name
= escape_html(index_item.consumer_name)
%td.consumer-version-number
%div
= index_item.consumer_version_number
= escape_html(index_item.consumer_version_number)
- if index_item.latest?
.tag.label.label-success
latest
- index_item.consumer_version_latest_tag_names.each do | tag_name |
.tag.label.label-primary
= tag_name
= escape_html(tag_name)
%td.pact
%span.pact
%a{ href: index_item.pact_url, title: "View pact" }
%span.pact-matrix
%a{ href: index_item.pact_matrix_url, title: "View pact matrix" }
%td.provider
%a{ href: index_item.provider_group_url }
= index_item.provider_name
= escape_html(index_item.provider_name)
%td.provider-version-number
%div
= index_item.provider_version_number
= escape_html(index_item.provider_version_number)
- index_item.provider_version_latest_tag_names.each do | tag_name |
.tag.label.label-primary
= tag_name
= escape_html(tag_name)
%td
= index_item.publication_date_of_latest_pact.gsub("about ", "")
%td{ class: index_item.webhook_status }
Expand Down
4 changes: 2 additions & 2 deletions lib/pact_broker/ui/views/index/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
%td
%td.consumer
%a{ href: index_item.consumer_group_url }
= index_item.consumer_name
= escape_html(index_item.consumer_name)
%td.pact
%span.pact
%a{ href: index_item.latest_pact_url, :title => "View pact" }
%span.pact-matrix
%a{ href: index_item.pact_matrix_url, title: "View pact matrix" }
%td.provider
%a{ href: index_item.provider_group_url }
= index_item.provider_name
= escape_html(index_item.provider_name)
%td
%td
= index_item.publication_date_of_latest_pact
Expand Down

0 comments on commit 6ee34af

Please sign in to comment.