Skip to content

Commit

Permalink
#228: escape commit changes as it might be html also
Browse files Browse the repository at this point in the history
  • Loading branch information
dgroup committed Oct 3, 2020
1 parent e179ea0 commit 00db060
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/messages/svn_log.erb
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@
</p>
<% else %>
<% if line.start_with?("+++") || line.start_with?("---") %>
<p style="background: gainsboro;"><%= line.gsub("<", "&lt;") %></p>
<p style="background: gainsboro;"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
<% elsif line.start_with?("+") %>
<p style="<%= "background: darkseagreen;" %>"><%= line.gsub("<", "&lt;") %></p>
<p style="<%= "background: darkseagreen;" %>"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
<% elsif line.start_with?("-") %>
<p style="<%= "background: lightsalmon;" %>"><%= line.gsub("<", "&lt;") %></p>
<p style="<%= "background: lightsalmon;" %>"><%= line.gsub(/[<>]/, '<' => '&lt;', '>' => '&gt;') %></p>
<% else %>
<p style="background: gainsboro;"><%= line %></p>
<p style="background: gainsboro;"><%= line.gsub(/[<>]/,'<' => '&lt;', '>' => '&gt;') %></p>
<% end %>
<% end %>
<% end %>
Expand Down

0 comments on commit 00db060

Please sign in to comment.