Unfortunately some the content stored in my database isn't marked up properly. For example & instead of &. When performing a search the results are being pulled and I'm getting XML error's because of this. I want to wrap the results in the php function htmlspecialchars to get around this.
How can i do this?