I'm currently working on making sure that text that is submitted into the database for a webapplication I am working on is sanitized properly before being submitted to the database, and then retrieved and displayed correctly.
Ignoring the jumble of sanitizing functions that are currently being used (it is currently a mess and breaks things), this is what I plan on doing:
Use CKEditor for text input. It automatically converts HTML tags/symbols their HTML entities.
Utilize PDO prepared statements to submit the text to the database.
Is this enough to properly sanitize input? I've been reading up on this, and many people say to use magic quotes, however I read that magic quotes is old and most recommend against using it.
Thank you in advance for any assistance!
<em>and<a>elements are allowed - now this should be enforced as it is part of the information.