From: Toshi MARUYAMA Date: Sat, 1 Oct 2011 01:13:03 +0000 (+0000) Subject: Rails3: lib: helper: use html_safe for Gantt X-Git-Tag: 1.3.0~419 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e2f57b5874957261992a690eb1eae3c70cde69ac;p=redmine.git Rails3: lib: helper: use html_safe for Gantt Contributed by Sylvain Utard. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7557 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index 576ec7c52..d6282d040 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -260,9 +260,9 @@ module Redmine def subject_for_project(project, options) case options[:format] when :html - subject = "" - subject << view.link_to_project(project) - subject << '' + subject = "".html_safe + subject << view.link_to_project(project).html_safe + subject << ''.html_safe html_subject(options, subject, :css => "project-name") when :image image_subject(options, project.name) @@ -298,9 +298,9 @@ module Redmine def subject_for_version(version, options) case options[:format] when :html - subject = "" - subject << view.link_to_version(version) - subject << '' + subject = "".html_safe + subject << view.link_to_version(version).html_safe + subject << ''.html_safe html_subject(options, subject, :css => "version-name") when :image image_subject(options, version.to_s_with_project) @@ -347,13 +347,13 @@ module Redmine css_classes << ' issue-behind-schedule' if issue.behind_schedule? css_classes << ' icon icon-issue' unless Setting.gravatar_enabled? && issue.assigned_to - subject = "" + subject = "".html_safe if issue.assigned_to.present? assigned_string = l(:field_assigned_to) + ": " + issue.assigned_to.name - subject << view.avatar(issue.assigned_to, :class => 'gravatar icon-gravatar', :size => 10, :title => assigned_string).to_s + subject << view.avatar(issue.assigned_to, :class => 'gravatar icon-gravatar', :size => 10, :title => assigned_string).to_s.html_safe end - subject << view.link_to_issue(issue) - subject << '' + subject << view.link_to_issue(issue).html_safe + subject << ''.html_safe html_subject(options, subject, :css => "issue-subject", :title => issue.subject) + "\n" when :image image_subject(options, issue.subject) @@ -737,36 +737,36 @@ module Redmine output = '' # Renders the task bar, with progress and late if coords[:bar_start] && coords[:bar_end] - output << "
 
" + output << "
 
".html_safe if coords[:bar_late_end] - output << "
 
" + output << "
 
".html_safe end if coords[:bar_progress_end] - output << "
 
" + output << "
 
".html_safe end end # Renders the markers if options[:markers] if coords[:start] - output << "
 
" + output << "
 
".html_safe end if coords[:end] - output << "
 
" + output << "
 
".html_safe end end # Renders the label on the right if options[:label] - output << "
" + output << "
".html_safe output << options[:label] - output << "
" + output << "
".html_safe end # Renders the tooltip if options[:issue] && coords[:bar_start] && coords[:bar_end] - output << "
" - output << '' - output << view.render_issue_tooltip(options[:issue]) - output << "
" + output << "
".html_safe + output << ''.html_safe + output << view.render_issue_tooltip(options[:issue]).html_safe + output << "
".html_safe end @lines << output output