From 07e3e526d037cb73ca4f56fa3b6035543483b45f Mon Sep 17 00:00:00 2001 From: nek0 Date: Wed, 30 Sep 2015 15:10:21 +0200 Subject: [PATCH] mitigated internal server error when calling an rss feed --- Handler/RootFeed.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Handler/RootFeed.hs b/Handler/RootFeed.hs index 8b648f4..13634dc 100644 --- a/Handler/RootFeed.hs +++ b/Handler/RootFeed.hs @@ -18,7 +18,8 @@ module Handler.RootFeed where import Import import qualified Data.Text as T -import qualified Data.Text.Lazy as L +import qualified Data.Text.Lazy as LT +import qualified Data.List as L import Data.Maybe import Data.Time import Text.Shakespeare.Text (stext) @@ -68,7 +69,7 @@ commentToEntry c = return FeedEntry { feedEntryLink = MediumR (commentOrigin $ entityVal c) , feedEntryUpdated = (commentTime $ entityVal c) - , feedEntryTitle = L.toStrict $ [stext|#{commentAuthorSlug $ entityVal c} wrote:|] + , feedEntryTitle = LT.toStrict $ [stext|#{commentAuthorSlug $ entityVal c} wrote:|] , feedEntryContent = [shamlet|#{commentContent $ entityVal c}|] , feedEntryEnclosure = Nothing } @@ -191,7 +192,7 @@ mediumToEntry ent = , feedEntryContent = toHtml (fromMaybe (Textarea "") $ mediumDescription $ entityVal ent) , feedEntryEnclosure = Just ( StaticR $ StaticRoute (drop 2 $ map T.pack $ splitDirectories $ mediumPreview $ entityVal ent) [] - , unsafePerformIO $ getSize $ mediumPreview $ entityVal ent + , unsafePerformIO $ getSize $ L.tail $ mediumPreview $ entityVal ent , "image/jpeg" ) }