public
Description: Treat an ActiveRecord model as a file attachment, storing its patch, size, content type, etc.
Homepage: http://weblog.techno-weenie.net
Clone URL: git://github.com/technoweenie/attachment_fu.git
Click here to lend your support to: attachment_fu and make a donation at www.pledgie.com !
Changed \w in sanitize_filename to A-Za-z0-9 in order to be less 
generalizing
iffy (author)
Sun Jun 01 19:55:19 -0700 2008
technoweenie (committer)
Mon Jun 02 11:02:36 -0700 2008
commit  d10004bfec5e954dd46915792783657b2d06aecc
tree    e87dde494e354bec774c377c40e62432daf7c706
parent  834553ad3d876541b986ed6de115ea0023070bb5
...
378
379
380
381
 
382
383
384
...
378
379
380
 
381
382
383
384
0
@@ -378,7 +378,7 @@ module Technoweenie # :nodoc:
0
             name.gsub! /^.*(\\|\/)/, ''
0
 
0
             # Finally, replace all non alphanumeric, underscore or periods with underscore
0
- name.gsub! /[^\w\.\-]/, '_'
0
+ name.gsub! /[^A-Za-z0-9\.\-]/, '_'
0
           end
0
         end
0
 

Comments

    No one has commented yet.