Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Running htmlspecialchars on Search Results

Go to End



Community Member, 33 Posts

10 February 2009 at 5:18am


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?