Magic quotes fixes.
Trim blacklisted regexes.