Man, but this needs more tests ... !
Add some tests. Sync with latest HTML5lib (includes above sanitization improvements).
Create a test case for utf-8 bug reported by Diego Restrepo. Seems to be related to WikiWord chunk handling. Add some other tests, and fix a minor bug in vendor/plugins/maruku/lib/maruku/ext/math/latex_fix.rb.