escape characters in URLs
This commit is contained in:
1 parent
8590219126
commit
3484fda01e
2 files changed
+23
-15
No files matched your search
@@ -42,10 +42,10 @@ encodeRequest req =
|
||||
authority = reqHost req ++ case reqPort req of
|
||||
Just port -> ':' : show port
|
||||
Nothing -> ""
|
||||
path = intercalate "/" $ reqPath req
|
||||
path = intercalate "/" $ map escapeString $ reqPath req
|
||||
query = case reqQuery req of
|
||||
"" -> ""
|
||||
q -> '?' : q
|
||||
q -> '?' : escapeString q
|
||||
|
||||
-- | add required escape sequences to a string
|
||||
escapeString :: String -> String
|
||||
|
||||
Reference in new issue
Block a user