This article describes a single MySql function to sanitize strings. The provided options are:
- replace multiple spaces to a single space
- remove Unix and Windows linebreaks and replace them with a space
- remove tabs and replace them for a single space
- remove multiple backslashes
- completely remove htmlentities (&)
- replace htmlentities with the corresponding character
- remove all HTML tags