HaskellCNOrg/snap-web — pull request #3 by rnons (2013-01-01 13:21:23+00:00)
Title: Atom feed of topics

You asked

> I saw you import blaze-html. Why not use snap default template heist?

In _src/Views/Feed.hs_, I import Blaze.ByteString.Builder to get the `Builder` data type, which is included in blaze-builder package. The benefit is that `renderFeed` can handle all the parts of View, so leave other things to the Controller.

FYI, [xmlhtml](http://hackage.haskell.org/package/xmlhtml) package which is a part of snap project depends on blaze-builder. So anyway, you need to have blaze-builder installed.

By the way,
1. What's the purpose of redefining `T.decodeUtf8` as `bsToText` in _src/Models/Utils.hs_?
2. What's the purpose of redefining `sanitizeBalance` as `xss` in _src/Views/MarkdownSplices.hs_?

IMHO, the `markdownToHtmlString` can be defined as:

```haskell
markdownToHtmlString = BS.pack . sanitizeBalance. writeDoc . readDoc . tabFilter4 . T.unpack
```