HTML Sanitizer 1.0

HTML Sanitizer takes a string with HTML code and strips all the tags that do not make part of a list of safe tags. That list of safe tags is defined as a private class variable. There are some functions to allow usually unsafe tags like script, style, object, embed, etc..

Unsafe tag attributes, such as JavaScript ones for event handling, can also be stripped. The links href attributes also gets special treatment to remove URLs that trigger JavaScript code execution and line breaks.