sanitizing get params

I replaced the $_GET params with a little sanitizing functionality to help prevent XSS. I also did a little code styling changing on the function to match the rest.