@@ -8,6 +8,7 @@ module Hakyll.Web.Preview.Server
88import Control.Monad.Trans (liftIO)
99import Control.Applicative ((<$>))
1010import Codec.Binary.UTF8.String
11+import Network.HTTP.Base (urlDecode)
1112import System.FilePath ((</>))
1213import System.Directory (doesFileExist)
1314
@@ -39,7 +40,7 @@ static directory preServe = do
3940 let filePath = replaceAll "\\?$" (const "") -- Remove trailing ?
4041 $ replaceAll "#[^#]*$" (const "") -- Remove #section
4142 $ replaceAll "^/" (const "") -- Remove leading /
42− $ decode $ SB.unpack uri
43+ $ urlDecode $ decode $ SB.unpack uri
4344
4445 -- Try to find the requested file
4546 r <- liftIO $ findFile $ map (directory </>) $