About

This article is about security when writing an application that shows HTML pages.

Because HTML and HTTP are heavily intermixed, this page has also some content of the HTTP security page.

User content / Sanitizing User Input

HTML is a programming language that can download and run script.

Therefore, you should be extremely careful with user-input or HTML content created by your users.

If you:

  • accept HTML, you might want to look into using Iframe with sandbox, but security is hard, and that doesn’t seem to be 100%.
  • don't accept HTML, you need to sanitize it by:

Configuration