diff --git a/Commands/Web.hs b/Commands/Web.hs index c7d31cd2d..ea049f739 100644 --- a/Commands/Web.hs +++ b/Commands/Web.hs @@ -168,12 +168,11 @@ hsp msgs f = do html =<< (io $ do hspenv <- hackEnvToHspEnv env (_,xml) <- runHSP html4Strict pagehsp hspenv - return $ addDoctype $ applyFixups $ renderAsHTML xml) + return $ addDoctype $ renderAsHTML xml) response $ set_content_type _TextHtmlUTF8 where title = "" addDoctype = ("\n" ++) - applyFixups = gsubRegexPR "\\[NBSP\\]" " " hackEnvToHspEnv :: Hack.Env -> IO HSPEnv hackEnvToHspEnv env = do x <- newIORef 0 @@ -229,11 +228,11 @@ searchform env = do a <- getParamOrNull "a" p <- getParamOrNull "p" let resetlink | null a && null p = - | otherwise = [NBSP]reset + | otherwise = <% nbsp %>reset where u = dropWhile (=='/') $ Hack.Contrib.Request.path env
- [NBSP]account pattern:[NBSP][NBSP][NBSP]reporting period:[NBSP] + <% nbsp %>account pattern:<% nbsp %><% nbsp %><% nbsp %>reporting period:<% nbsp %> <% resetlink %>
@@ -255,8 +254,8 @@ addform env = do <% transactionfields 1 env %> @@ -280,9 +279,9 @@ transactionfields n env = do #endif where @@ -369,3 +368,5 @@ handleAddform l = do ledgerpage [msg] l (showTransactions (optsToFilterSpec [] [] ti)) where msg = printf "Added transaction:\n%s" (show t) +nbsp :: XML +nbsp = cdata " "
- Date: [NBSP] - Description: [NBSP] + Date: <% nbsp %> + Description: <% nbsp %>
- [NBSP][NBSP] - Account: [NBSP] - Amount: [NBSP] + <% nbsp %><% nbsp %> + Account: <% nbsp %> + Amount: <% nbsp %>