I am sorry. I am going to have to claim "shenanigans" on this solution. This issue is NOT SOLVED. Content created in HTML format, has but one function… to support the intention of viewing a RENDERED PAGE in some kind of browser! Why else would we want to save content in HTML format inside the repository to begin with? Granted, there are some unsafe HTML tags that should definitely be stripped out. However, when you press the "View in Browser" link, one should be able to see something that is representative of the HTML content, using the text/html mimetype. We shouldn't have to mire ourselves in additional ftl's or scripting. The only thing that is preventing us from seeing our HTML is a text/plain content type header vs a text/html one. Even with the ftl scripting, we wont be able to see anything close to a rendered page without the text/html mime-type. Please get on the ball on this one Alfresco Developers. This work-about solution is not a solution that satisfies the nature of the problem.
If the above solution does solve the problem, and I missed something, I would be glad to hear it out with step by step instructions on how this thing that SHOULD ALREADY BE THERE, can be added to seamlessly show rendered HTML content by simply pressing the View in Browser link.