Allow custom sanitizing functions to be added to the XSS sniff

Closes #144
Replaces and Closes #148