parent
2eaf168c26
commit
fc112adc42
@ -1,7 +1,9 @@ |
||||
class FilenameHelper |
||||
module OpenProject::XlsExport |
||||
class FilenameHelper |
||||
# Remove characters that could cause problems on popular OSses |
||||
# => A string that does not start with a space or dot and does not contain any of \/:*?"<>| |
||||
def self.sane_filename(str) |
||||
str.gsub(/^[ \.]/,"").gsub(/[\\\/:\*\?"<>|"]/, "_") |
||||
end |
||||
end |
||||
end |
Loading…
Reference in new issue