I'm using Yesod to write a personal backup system, and running into an interesting issue. I'm relatively inexperienced when it comes to Haskell so I'm sure none of this is optimal.
Here is one of my handlers:
postHostR :: Text -> RcPath -> Handler Text
postHostR hostName f = do
hostId <- insertIfDontExist hostName
tBody <- (T.pack . show) <$> getRawRequest
time <- lift getCurrentTime
newId <- runDB $ insert $ RcFile hostId tBody (makePath f) time
return $ T.pack $ show newId
Any of the text I retrieve from the DB has double quotes automatically added. I'm assuming this is some kind of XSS security but I'm not concerned about that since I'm not going to be rendering pages. The quotes don't seem to be actually part of the text (I've tried just stripping the first and last character, but that doesn't seem to actually remove the quotes).
Thanks!