Actions
Defect #38728
closedCorrectly escape issue text in Gantt PNG export for ImageMagick convert
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
According to https://imagemagick.org/Usage/draw/#text, we need to quote the passed text and only escape the quote character and backslash with backslashes respectively. Redmine::Utils::Shell.shell_quote
escapes the single quote for a wrong environment (namely a shell) which results in errors if an issue subject contains a single quote character.
The attached patch fixes this by using specific quoting/escaping for the ImageMagick convert command.
Note that the usual shell special characters (such as $
, `
, ...) do not need to be escaped here since the shellouts performed by MiniMagick are perfomed with Open3.popen3
which does not launch a shell but runs the command directly.
Files
Related issues
Actions