summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-10-15 11:15:54 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-10-15 11:15:54 +0000
commit33e40548642d111471e7b21dba385a4a487ca642 (patch)
tree68b0ddc95507cd7af96577094546b95c1b9b25bd /app/helpers
parent80ca181239e51581f4dc1b350330ba66aac400a0 (diff)
downloadredmine-33e40548642d111471e7b21dba385a4a487ca642.tar.gz
redmine-33e40548642d111471e7b21dba385a4a487ca642.zip
Merged r16983 to r16985 (#27186).
git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@16988 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb3
-rw-r--r--app/helpers/queries_helper.rb3
2 files changed, 4 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 8966e949b..00f385de1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -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'
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb
index 3e45d635e..b689227ac 100644
--- a/app/helpers/queries_helper.rb
+++ b/app/helpers/queries_helper.rb
@@ -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