Skip to content

Commit

Permalink
fix: sanitize html in matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Apr 1, 2019
1 parent dca7650 commit c4d74d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/pact_broker/ui/views/matrix/show.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
- if defined?(errors) && errors.any?
- errors.each do | error |
%div.alert.alert-danger
= error
= escape_html(error)

%form{action: '/matrix', onsubmit:'return onSubmit()'}
- selectors.each_with_index do | selector, index |
.selector
%label{for: "pacticipant#{index}"}
Pacticipant name
%input{name: 'q[]pacticipant', id: "pacticipant1#{index}", value: selector.pacticipant_name}
%input{name: 'q[]pacticipant', id: "pacticipant1#{index}", value: escape_html(selector.pacticipant_name)}

.input-group

Expand All @@ -41,9 +41,9 @@
%option{ value: 'specify-all-tagged', selected: selector.specify_all_tagged }
All versions with tag...

%input{name: 'q[]version', type: 'text', id: "pacticipant#{index}_version", class: 'version', value: selector.pacticipant_version_number}
%input{name: 'q[]version', type: 'text', id: "pacticipant#{index}_version", class: 'version', value: escape_html(selector.pacticipant_version_number)}

%input{name: 'q[]tag', type: 'text', id: "pacticipant#{index}_tag", class: 'tag', value: selector.tag}
%input{name: 'q[]tag', type: 'text', id: "pacticipant#{index}_tag", class: 'tag', value: escape_html(selector.tag)}

%input{name: 'q[]latest', value: 'true', hidden: true, class: 'latest-flag'}

Expand Down

0 comments on commit c4d74d8

Please sign in to comment.