From 5c0487200f2642ffe597431ae4f685a0f35d35f1 Mon Sep 17 00:00:00 2001 From: bjorn Date: Sun, 24 Aug 2008 17:39:24 +0000 Subject: URL decode text input in fastcgi server, including %uXXXX sequences. --- src/server/MainFastCGI.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/server/MainFastCGI.hs') diff --git a/src/server/MainFastCGI.hs b/src/server/MainFastCGI.hs index 230e09b00..b7af9fce4 100644 --- a/src/server/MainFastCGI.hs +++ b/src/server/MainFastCGI.hs @@ -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" -- cgit v1.2.3