]> source.dussan.org Git - redmine.git/commitdiff
Merged r16983 to r16985 (#27186).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 15 Oct 2017 11:15:48 +0000 (11:15 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 15 Oct 2017 11:15:48 +0000 (11:15 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@16987 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb
app/helpers/queries_helper.rb
app/views/timelog/_list.html.erb

index 5183393f5b8a83d84f6d3de13e03e24281028e39..0c85598e06e3825b940bb697814a93b6c7e98ac2 100644 (file)
@@ -176,7 +176,8 @@ module ApplicationHelper
     end
     case object.class.name
     when 'Array'
-      object.map {|o| format_object(o, html)}.join(', ').html_safe
+      formatted_objects = object.map {|o| format_object(o, html)}
+      html ? safe_join(formatted_objects, ', ') : formatted_objects.join(', ')
     when 'Time'
       format_time(object)
     when 'Date'
index 0bea000db5d88067c893631eae055fd839cf1d19..27864319165757807f40bb068f672e197d0dea91 100644 (file)
@@ -129,7 +129,8 @@ module QueriesHelper
   def column_content(column, issue)
     value = column.value_object(issue)
     if value.is_a?(Array)
-      value.collect {|v| column_value(column, issue, v)}.compact.join(', ').html_safe
+      values = value.collect {|v| column_value(column, issue, v)}.compact
+      safe_join(values, ', ')
     else
       column_value(column, issue, value)
     end
index 89e1bc8c36fc15cfb5d3b1b6b690241c41d7f810..5ee9eea6749b1763fcc43d7e1fbf0c97b76f5f0e 100644 (file)
@@ -18,7 +18,9 @@
 <% entries.each do |entry| -%>
   <tr class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
     <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
-    <%= raw @query.inline_columns.map {|column| "<td class=\"#{column.css_classes}\">#{column_content(column, entry)}</td>"}.join %>
+    <% @query.inline_columns.each do |column| %>
+    <%= content_tag('td', column_content(column, entry), :class => column.css_classes) %>
+    <% end %>
     <td class="buttons">
     <% if entry.editable_by?(User.current) -%>
         <%= link_to l(:button_edit), edit_time_entry_path(entry),