Skip to content

Commit

Permalink
Correctly escape HTML in source code listings.
Browse files Browse the repository at this point in the history
Thanks to dmathieu!

Fixes #2 :)
  • Loading branch information
colszowka committed Aug 25, 2010
1 parent 52532f0 commit 4414054
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/simplecov-html.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'erb'
require 'cgi'
require 'fileutils'
require 'digest/sha1'
require 'time'
Expand Down
2 changes: 1 addition & 1 deletion views/source_file.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<pre><%= line.number %></pre>
</td>
<td>
<pre><%= line.src.chomp %></pre>
<pre><%= CGI.escapeHTML(line.src.chomp) %></pre>
</td>
<td class="hits">
<%= line.coverage %>
Expand Down

0 comments on commit 4414054

Please sign in to comment.