Underscore and hyphen are both valid characters for a file name. Changing hyphens to underscore caused a good deal of confusion when letter_opener renamed the downloaded file. It makes good sense to strip other problematic characters, but we had an attachment with a simple and valid name, and it was being renamed. Our confusion was furthered by - becoming _ as we assumed it was a fat-finger error in our code.
This PR allows those two word separator characters (often used in Ruby land) to remain untouched.
Underscore and hyphen are both valid characters for a file name. Changing hyphens to underscore caused a good deal of confusion when
letter_opener
renamed the downloaded file. It makes good sense to strip other problematic characters, but we had an attachment with a simple and valid name, and it was being renamed. Our confusion was furthered by-
becoming_
as we assumed it was a fat-finger error in our code.This PR allows those two word separator characters (often used in Ruby land) to remain untouched.