From: Jean-Philippe Lang Date: Sat, 30 Jul 2011 08:35:43 +0000 (+0000) Subject: Additional escaping. X-Git-Tag: 1.3.0~1616 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c3be706ce572f7a7e1c5f47b62215a1aeb66ee2c;p=redmine.git Additional escaping. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6327 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index 3028cd4ed..bcc4cfa11 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -57,7 +57,7 @@ module CustomFieldsHelper # Return custom field label tag def custom_field_label_tag(name, custom_value) - content_tag "label", custom_value.custom_field.name + + content_tag "label", h(custom_value.custom_field.name) + (custom_value.custom_field.is_required? ? " *" : ""), :for => "#{name}_custom_field_values_#{custom_value.custom_field.id}", :class => (custom_value.errors.empty? ? nil : "error" ) diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 31a363d28..e65e957b6 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -24,7 +24,7 @@ module QueriesHelper def column_header(column) column.sortable ? sort_header_tag(column.name.to_s, :caption => column.caption, :default_order => column.default_order) : - content_tag('th', column.caption) + content_tag('th', h(column.caption)) end def column_content(column, issue) diff --git a/app/helpers/sort_helper.rb b/app/helpers/sort_helper.rb index a1808a056..e7b2ba7c0 100644 --- a/app/helpers/sort_helper.rb +++ b/app/helpers/sort_helper.rb @@ -205,7 +205,7 @@ module SortHelper # Add project_id to url_options url_options = url_options.merge(:project_id => params[:project_id]) if params.has_key?(:project_id) - link_to_content_update(caption, url_options, :class => css) + link_to_content_update(h(caption), url_options, :class => css) end # Returns a table header tag with a sort link for the named column diff --git a/app/views/context_menus/issues.html.erb b/app/views/context_menus/issues.html.erb index 7b67c65c7..34861c917 100644 --- a/app/views/context_menus/issues.html.erb +++ b/app/views/context_menus/issues.html.erb @@ -14,7 +14,7 @@ <%= l(:field_status) %> @@ -26,7 +26,7 @@ <%= l(:field_tracker) %> @@ -37,7 +37,7 @@ <%= l(:field_priority) %> @@ -62,7 +62,7 @@ <%= l(:field_assigned_to) %>