I'm building a function that converts html to xhtml. I built a nice array of characters and another one with the corresponding replacements. How do I go and replace everything that is not alphanumeric and also not in the array of allowed characters with nothing ('') ?