No! Never sanatize your input! You will forget edge cases. Use prepared statements and nothing else (ORMs like ActiveRecords use prepared statements under the hood)
Thanks for the feedback! Could be a good note to add the pros and cons of sanitized strings.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.