1
0
forked from GitHub/gf-core

URL decode text input in fastcgi server, including %uXXXX sequences.

This commit is contained in:
bjorn
2008-08-24 17:39:24 +00:00
parent 9a29d50763
commit 646bf9c4d8
2 changed files with 20 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
import PGF (PGF)
import qualified PGF
import FastCGIUtils
import URLEncoding
import Network.CGI
import Text.JSON
@@ -42,7 +43,7 @@ cgiMain pgf =
outputJSON json
where
getText :: CGI String
getText = liftM (fromMaybe "") $ getInput "input"
getText = liftM (maybe "" urlDecodeUnicode) $ getInput "input"
getTree :: CGI PGF.Tree
getTree = do mt <- getInput "tree"