diff --git a/Yesod/Form/Nic.hs b/Yesod/Form/Nic.hs index 328d36d2..30622b12 100644 --- a/Yesod/Form/Nic.hs +++ b/Yesod/Form/Nic.hs @@ -12,7 +12,7 @@ import Yesod.Handler import Yesod.Form.Core import Yesod.Hamlet import Yesod.Widget -import Text.HTML.SanitizeXSS (sanitizeXSS) +import Text.HTML.SanitizeXSS (sanitizeBalance) import Yesod.Internal (lbsToChars) @@ -32,7 +32,7 @@ maybeNicHtmlField = optionalFieldHelper nicHtmlFieldProfile nicHtmlFieldProfile :: YesodNic y => FieldProfile sub y Html nicHtmlFieldProfile = FieldProfile - { fpParse = Right . preEscapedString . sanitizeXSS + { fpParse = Right . preEscapedString . sanitizeBalance , fpRender = lbsToChars . renderHtml , fpWidget = \theId name val _isReq -> do addHtml [$hamlet|%textarea.html#$theId$!name=$name$ $val$|] diff --git a/Yesod/Form/Profiles.hs b/Yesod/Form/Profiles.hs index ba9d3eec..26442d6f 100644 --- a/Yesod/Form/Profiles.hs +++ b/Yesod/Form/Profiles.hs @@ -24,7 +24,7 @@ import Data.Time (Day, TimeOfDay(..)) import qualified Text.Email.Validate as Email import Network.URI (parseURI) import Database.Persist (PersistField) -import Text.HTML.SanitizeXSS (sanitizeXSS) +import Text.HTML.SanitizeXSS (sanitizeBalance) import Text.Blaze.Builder.Utf8 (writeChar) import Text.Blaze.Builder.Core (writeList, writeByteString) @@ -74,7 +74,7 @@ timeFieldProfile = FieldProfile htmlFieldProfile :: FieldProfile sub y Html htmlFieldProfile = FieldProfile - { fpParse = Right . preEscapedString . sanitizeXSS + { fpParse = Right . preEscapedString . sanitizeBalance , fpRender = lbsToChars . renderHtml , fpWidget = \theId name val _isReq -> addHamlet [$hamlet| %textarea.html#$theId$!name=$name$ $val$ diff --git a/Yesod/Helpers/AtomFeed.hs b/Yesod/Helpers/AtomFeed.hs index 3e44c959..0e6a5160 100644 --- a/Yesod/Helpers/AtomFeed.hs +++ b/Yesod/Helpers/AtomFeed.hs @@ -19,6 +19,7 @@ module Yesod.Helpers.AtomFeed ( AtomFeed (..) , AtomFeedEntry (..) , atomFeed + , atomLink , RepAtom (..) ) where @@ -69,3 +70,11 @@ entryTemplate arg = [$xhamlet| %title $atomEntryTitle.arg$ %content!type=html $cdata.atomEntryContent.arg$ |] + +-- | Generates a link tag in the head of a widget. +atomLink :: Route m + -> String -- ^ title + -> GWidget s m () +atomLink u title = addHamletHead [$hamlet| +%link!href=@u@!type="application/atom+xml"!rel="alternate"!title=$title$ +|] diff --git a/yesod.cabal b/yesod.cabal index fe56e8ca..4d8dd34a 100644 --- a/yesod.cabal +++ b/yesod.cabal @@ -1,5 +1,5 @@ name: yesod -version: 0.6.0.2 +version: 0.6.1 license: BSD3 license-file: LICENSE author: Michael Snoyman @@ -44,7 +44,7 @@ library , network >= 2.2.1.5 && < 2.3 , email-validate >= 0.2.5 && < 0.3 , web-routes >= 0.23 && < 0.24 - , xss-sanitize >= 0.2 && < 0.3 + , xss-sanitize >= 0.2.3 && < 0.3 , data-default >= 0.2 && < 0.3 , failure >= 0.1 && < 0.2 , containers >= 0.2 && < 0.5