diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-25 06:01:48 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-25 06:01:48 +0000 |
commit | b4630c03f73276e5ae22cc1174413e51f36eaa1c (patch) | |
tree | b9456337f86333418e5859400c65f2ac4e2dbc3c /app/views/repositories/annotate.html.erb | |
parent | b7ead65fde0fb813f4787e448d8c76670539a95e (diff) | |
download | redmine-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/repositories/annotate.html.erb')
-rw-r--r-- | app/views/repositories/annotate.html.erb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/repositories/annotate.html.erb b/app/views/repositories/annotate.html.erb index 188d9215d..1cd782588 100644 --- a/app/views/repositories/annotate.html.erb +++ b/app/views/repositories/annotate.html.erb @@ -14,14 +14,14 @@ <table class="filecontent annotate syntaxhl"> <tbody> <% line_num = 1 %> - <% syntax_highlight(@path, Redmine::CodesetUtil.to_utf8_by_setting(@annotate.content)).each_line do |line| %> + <% syntax_highlight_lines(@path, Redmine::CodesetUtil.to_utf8_by_setting(@annotate.content)).each do |line| %> <% revision = @annotate.revisions[line_num - 1] %> <tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>"> <th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th> <td class="revision"> <%= (revision.identifier ? link_to_revision(revision, @repository) : format_revision(revision)) if revision %></td> <td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td> - <td class="line-code"><pre><%= line %></pre></td> + <td class="line-code"><pre><%= line.html_safe %></pre></td> </tr> <% line_num += 1 %> <% end %> |