How can I store user contributed text while maintaing links, formatting, etc? (Basically exactly what stack overflow does with our posts)
It seems extremely dangerous to allow any HTML to be stored in text. What are some existing conventions?
Site is built in PHP, databases are MySQL if it matters.
StackOverflow, and other sites such as Github, extend Markdown.
Here is a PHP port of Markdown. You could use it for display and store the raw Markdown formatted input.