Blacklist -> whitelist for staticFiles
This commit is contained in:
parent
cc09c071a6
commit
967ad7ec80
@ -153,9 +153,11 @@ staticFiles fp = do
|
|||||||
fs <- qRunIO $ getFileList fp
|
fs <- qRunIO $ getFileList fp
|
||||||
concat `fmap` mapM go fs
|
concat `fmap` mapM go fs
|
||||||
where
|
where
|
||||||
replace' '.' = '_'
|
replace' c
|
||||||
replace' '-' = '_'
|
| 'A' <= c && c <= 'Z' = c
|
||||||
replace' c = c
|
| 'a' <= c && c <= 'z' = c
|
||||||
|
| '0' <= c && c <= '9' = c
|
||||||
|
| otherwise = '_'
|
||||||
go f = do
|
go f = do
|
||||||
let name = mkName $ intercalate "_" $ map (map replace') f
|
let name = mkName $ intercalate "_" $ map (map replace') f
|
||||||
f' <- lift f
|
f' <- lift f
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod
|
name: yesod
|
||||||
version: 0.6.3
|
version: 0.6.3.1
|
||||||
license: BSD3
|
license: BSD3
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user