Defect #34046 ยป fixed-34046.patch
| lib/redmine/helpers/gantt.rb | ||
|---|---|---|
|
gc.stroke('transparent')
|
||
|
gc.strokewidth(1)
|
||
|
gc.draw('text %d,%d %s' % [
|
||
|
left.round + 8, 14, Redmine::Utils::Shell.shell_quote("#{month_f.year}-#{month_f.month}")
|
||
|
left.round + 8, 14, image_text_quote("#{month_f.year}-#{month_f.month}")
|
||
|
])
|
||
|
left = left + width
|
||
|
month_f = month_f >> 1
|
||
| ... | ... | |
|
gc.stroke('transparent')
|
||
|
gc.strokewidth(1)
|
||
|
gc.draw('text %d,%d %s' % [
|
||
|
left.round + 2, header_height + 14, Redmine::Utils::Shell.shell_quote(week_f.cweek.to_s)
|
||
|
left.round + 2, header_height + 14, image_text_quote(week_f.cweek.to_s)
|
||
|
])
|
||
|
left = left + width
|
||
|
week_f = week_f + 7
|
||
| ... | ... | |
|
params[:image].stroke('transparent')
|
||
|
params[:image].strokewidth(1)
|
||
|
params[:image].draw('text %d,%d %s' % [
|
||
|
params[:indent], params[:top] + 2, Redmine::Utils::Shell.shell_quote(subject)
|
||
|
params[:indent], params[:top] + 2, image_text_quote(subject)
|
||
|
])
|
||
|
end
|
||
| ... | ... | |
|
if label
|
||
|
params[:image].fill('black')
|
||
|
params[:image].draw('text %d,%d %s' % [
|
||
|
params[:subject_width] + (coords[:bar_end] || 0) + 5, params[:top] + 1, Redmine::Utils::Shell.shell_quote(label)
|
||
|
params[:subject_width] + (coords[:bar_end] || 0) + 5, params[:top] + 1, image_text_quote(label)
|
||
|
])
|
||
|
end
|
||
|
end
|
||
|
def image_text_quote(text)
|
||
|
if Redmine::Platform.mswin?
|
||
|
%Q!"#{text.gsub(/(")/, '\\\\\1')}"!
|
||
|
else
|
||
|
%Q!'#{text.gsub(/(')/, '\\\\\1')}'!
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
| test/functional/gantts_controller_test.rb | ||
|---|---|---|
|
if Object.const_defined?(:MiniMagick) && convert_installed?
|
||
|
def test_gantt_should_export_to_png
|
||
|
Issue.generate!(:subject => %q!Subject containing special characters " and '!)
|
||
|
get(
|
||
|
:show,
|
||
|
:params => {
|
||