After some digging, I found this undocumented option for has_attached_file:
:restricted_characters
The default value of this parameter is as follows:
:restricted_characters => /[&$+,\/:;=?@<>\[\]\{\}\|\\\^~%
The last is a gap. Remove it and you are good.
source
share