summaryrefslogtreecommitdiffstats
path: root/app/views/common
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-25 06:01:48 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-02-25 06:01:48 +0000
commitb4630c03f73276e5ae22cc1174413e51f36eaa1c (patch)
treeb9456337f86333418e5859400c65f2ac4e2dbc3c /app/views/common
parentb7ead65fde0fb813f4787e448d8c76670539a95e (diff)
downloadredmine-b4630c03f73276e5ae22cc1174413e51f36eaa1c.tar.gz
redmine-b4630c03f73276e5ae22cc1174413e51f36eaa1c.zip
Rails3: prevent double rendering file view and annotate on Rails 3.0.11 and Rails 3.1.3
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8988 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/common')
-rw-r--r--app/views/common/_file.html.erb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/common/_file.html.erb b/app/views/common/_file.html.erb
index 418073efa..22126b949 100644
--- a/app/views/common/_file.html.erb
+++ b/app/views/common/_file.html.erb
@@ -2,13 +2,13 @@
<table class="filecontent syntaxhl">
<tbody>
<% line_num = 1 %>
-<% syntax_highlight(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each_line do |line| %>
+<% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %>
<tr>
<th class="line-num" id="L<%= line_num %>">
<a href="#L<%= line_num %>"><%= line_num %></a>
</th>
<td class="line-code">
- <pre><%= line %></pre>
+ <pre><%= line.html_safe %></pre>
</td>
</tr>
<% line_num += 1 %>