diff options
| -rw-r--r-- | app/models/concerns/file_attachment.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/concerns/file_attachment.rb b/app/models/concerns/file_attachment.rb index 613a6f0..3c09456 100644 --- a/app/models/concerns/file_attachment.rb +++ b/app/models/concerns/file_attachment.rb | |||
| @@ -106,7 +106,8 @@ module FileAttachment | |||
| 106 | end | 106 | end |
| 107 | 107 | ||
| 108 | def sanitize_filename(filename) | 108 | def sanitize_filename(filename) |
| 109 | File.basename(filename).gsub(/[^\w\.\-]/, '_') | 109 | name = File.basename(filename).unicode_normalize(:nfc) |
| 110 | name.gsub(/(?u)[^\w\.\-]/, '_') | ||
| 110 | end | 111 | end |
| 111 | 112 | ||
| 112 | # Proxy object returned by asset.upload, providing the Paperclip-compatible | 113 | # Proxy object returned by asset.upload, providing the Paperclip-compatible |
