I developed a web application, that permits my users to manage some aspects of a web site dynamically (yes, some kind of cms) in LAMP environment (debian, apache, php, mysql
You might want to consider, rather than allowing HTML at all, implementing some standin for HTML like BBCode or Markdown.