Extension:Secure HTML

The problem is you occasionally need to display aribtrary HTML within a wiki, but allowing it site-wide opens you up to various XSS attacks. This extension solves that problem by letting you specify arbitrary HTML, but only if the HTML includes a correspoding hash that is created by combining the HTML input, along with a secret key that only authorized people know.

Once you set up the extension, go to Special:SecureHTMLInput, input an optional key name, the key value, and the HTML you wish to display. The page will return a snippet such as this:

This is some HTML

Simply place the generated snippet within an article, and the HTML will be displayed. However, if somebody else tries to modify that HTML block, the hash will no longer compute correctly, and the HTML will not be displayed within the article.