Blacklist -> whitelist for staticFiles

This commit is contained in:
Michael Snoyman 2010-11-21 20:21:48 +02:00
parent cc09c071a6
commit 967ad7ec80
2 changed files with 6 additions and 4 deletions

View File

@ -153,9 +153,11 @@ staticFiles fp = do
fs <- qRunIO $ getFileList fp
concat `fmap` mapM go fs
where
replace' '.' = '_'
replace' '-' = '_'
replace' c = c
replace' c
| 'A' <= c && c <= 'Z' = c
| 'a' <= c && c <= 'z' = c
| '0' <= c && c <= '9' = c
| otherwise = '_'
go f = do
let name = mkName $ intercalate "_" $ map (map replace') f
f' <- lift f

View File

@ -1,5 +1,5 @@
name: yesod
version: 0.6.3
version: 0.6.3.1
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>