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