You should never strip characters from a user's password. If they enter their password as "r2^£XS\'32" and then you filter it before storing it, they'll never be able to log in as their password will be incorrect.
As for whether you should restrict characters in a password, that's a different matter. You'll need to restrict characters that are not part of whatever character coding you use, but aside from that it's a bad idea. Limiting the character set available makes it easier for brute force attacks to be successful.
Instead, what you want to do is use prepared statements as these will prevent SQL injection (which is, I believe, your concern).
It's also worth mentioning that you should hash your passwords before storing them; never store as plain-text or as reversible encryptions. Ideally, also salt the password for additional security.
Check out Password Hashing and PDO and Prepared Statements for more information