work around evilsplicer bug

Really simple TH splices are printed in a way it doesn't parse.
This commit is contained in:
Joey Hess 2013-09-20 12:19:55 -04:00
parent 210700493d
commit 3bd05c27d2
2 changed files with 5 additions and 6 deletions

View file

@ -242,4 +242,4 @@ encrypted using gpg key:
<li>
^{gpgKeyDisplay k (M.lookup k knownkeys)}
|]
getRepoEncryption _ _ = [whamlet||] -- local repo
getRepoEncryption _ _ = return () -- local repo

View file

@ -25,12 +25,11 @@ gpgKeyDisplay :: KeyId -> Maybe UserId -> Widget
gpgKeyDisplay keyid userid = [whamlet|
<span title="key id #{keyid}">
<i .icon-user></i> #
^{displayname}
$maybe name <- userid
#{name}
$nothing
key id #{keyid}
|]
where
displayname = case userid of
Just name | not (null name) -> [whamlet|#{name}|]
_ -> [whamlet|key id #{keyid}|]
{- Generates a gpg user id that is not used by any existing secret key -}
newUserId :: IO UserId