Skip to content

Commit

Permalink
urlEncode values out of ASCII range
Browse files Browse the repository at this point in the history
  • Loading branch information
sopvop committed Jun 9, 2015
1 parent f1b24eb commit dbfc806
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Snap/Internal/Parsing.hs
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,9 @@ urlEncodeBuilder = go mempty
urlEncodeClean :: Char -> Bool
urlEncodeClean = toTable f
where
f c = any ($ c) [isAlphaNum, flip elem [ '$', '_', '-', '.', '!'
, '*' , '\'', '(', ')', ',' ]]
f c = any ($ c) [\c -> isAscii c && isAlphaNum c
, flip elem [ '$', '_', '-', '.', '!'
, '*' , '\'', '(', ')', ',' ]]


------------------------------------------------------------------------------
Expand Down

0 comments on commit dbfc806

Please sign in to comment.