It is good practice to both validate data and escape it correctly when using it in a database although strictly speaking, only the validation step may be required.
You should probably have an application-wide standard for how to correctly escape data going into the DB - prepared queries are ideal.
Validating against a set of characters is quite a useful thing to do, you might wish to write a function to do this, either with a regexp or some other way.
Finally, I have a routine which I use to detect things which are just too stupid to ever be required, which is called on every page, and spits out a 400 error if unusual ascii control characters appear anywhere in the GET or POST data and in a few other stupid cases.
Mark