##// END OF EJS Templates
Rails3: view: html_safe for common/_diff.html.erb...
Toshi MARUYAMA -
r8799:652871d4c3e4
parent child
Show More
@@ -1,67 +1,67
1 1 <% diff = Redmine::UnifiedDiff.new(
2 2 diff, :type => diff_type,
3 3 :max_lines => Setting.diff_max_lines_displayed.to_i) -%>
4 4
5 5 <% diff.each do |table_file| -%>
6 6 <div class="autoscroll">
7 7 <% if diff.diff_type == 'sbs' -%>
8 8 <table class="filecontent">
9 9 <thead>
10 10 <tr>
11 11 <th colspan="4" class="filename">
12 12 <%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %>
13 13 </th>
14 14 </tr>
15 15 </thead>
16 16 <tbody>
17 17 <% table_file.each_line do |spacing, line| -%>
18 18 <% if spacing -%>
19 19 <tr class="spacing">
20 20 <th class="line-num">...</th><td></td><th class="line-num">...</th><td></td>
21 21 </tr>
22 22 <% end -%>
23 23 <tr>
24 24 <th class="line-num"><%= line.nb_line_left %></th>
25 25 <td class="line-code <%= line.type_diff_left %>">
26 <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_left) %></pre>
26 <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_left).html_safe %></pre>
27 27 </td>
28 28 <th class="line-num"><%= line.nb_line_right %></th>
29 29 <td class="line-code <%= line.type_diff_right %>">
30 <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_right) %></pre>
30 <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_right).html_safe %></pre>
31 31 </td>
32 32 </tr>
33 33 <% end -%>
34 34 </tbody>
35 35 </table>
36 36
37 37 <% else -%>
38 38 <table class="filecontent">
39 39 <thead>
40 40 <tr>
41 41 <th colspan="3" class="filename">
42 42 <%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %>
43 43 </th>
44 44 </tr>
45 45 </thead>
46 46 <tbody>
47 47 <% table_file.each_line do |spacing, line| %>
48 48 <% if spacing -%>
49 49 <tr class="spacing">
50 50 <th class="line-num">...</th><th class="line-num">...</th><td></td>
51 51 </tr>
52 52 <% end -%>
53 53 <tr>
54 54 <th class="line-num"><%= line.nb_line_left %></th>
55 55 <th class="line-num"><%= line.nb_line_right %></th>
56 56 <td class="line-code <%= line.type_diff %>">
57 <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line) %></pre>
57 <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line).html_safe %></pre>
58 58 </td>
59 59 </tr>
60 60 <% end -%>
61 61 </tbody>
62 62 </table>
63 63 <% end -%>
64 64 </div>
65 65 <% end -%>
66 66
67 67 <%= l(:text_diff_truncated) if diff.truncated? %>
General Comments 0
You need to be logged in to leave comments. Login now