Are there any plugins or libraries for storing markup in a database that can be translated into HTML without actually storing HTML markup (to prevent cross-site scripting attacks)?
I guess what I’m looking for is an automatic, safe way to translate something like BBCode (that would be stored in the database, marking up the text) into the rendered HTML.
You can use markdown, just like Stack Overflow does.
It uses MarkdownSharp, as discussed in this blog and Meta.