Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Better approach to fixing preview: use renderHtmlFragment and encode …

…string.

Version bump to 0.4.1.3.
  • Loading branch information...
commit 9d0f73ae7a73370db5c1a7a241d53e13dabb2346 1 parent 346bc19
@jgm jgm authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 Gitit.hs
  2. +1 −1  gitit.cabal
View
4 Gitit.hs
@@ -61,7 +61,7 @@ import Network.Socket
import Network.Captcha.ReCaptcha (captchaFields, validateCaptcha)
gititVersion :: String
-gititVersion = "0.4.1.2"
+gititVersion = "0.4.1.3"
sessionTime :: Int
sessionTime = 60 * 60 -- session will expire 1 hour after page request
@@ -664,7 +664,7 @@ parseMatchLine matchLine =
in (file, contents)
preview :: String -> Params -> Web Response
-preview _ params = pandocToHtml (textToPandoc $ pRaw params) >>= ok . toResponse
+preview _ params = pandocToHtml (textToPandoc $ pRaw params) >>= ok . toResponse . encodeString . renderHtmlFragment
showPageHistory :: String -> Params -> Web Response
showPageHistory page params = showHistory (pathForPage page) page params
View
2  gitit.cabal
@@ -1,5 +1,5 @@
name: gitit
-version: 0.4.1.2
+version: 0.4.1.3
Cabal-version: >= 1.2
build-type: Simple
synopsis: Wiki using HAppS, git, and pandoc.

0 comments on commit 9d0f73a

Please sign in to comment.
Something went wrong with that request. Please try again.