Blacklist -> whitelist for staticFiles
This commit is contained in:
parent
cc09c071a6
commit
967ad7ec80
@ -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
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user