Board Thread:Code Review/@comment-4356266-20151008134915/@comment-5590118-20151012122423

If you really want to make this safe (and acceptable to staff since I am sure this will not pass their code review) you really need to deal with just plain wikitext and let the MediaWiki parser do all of the security related stuff.

You really need to ask yourself why you have to allow raw HTML especially when you do not have to.