Clean up attributes before passing them to SAX