Fixes a (potentially not exploitable) SQL injection in ajax/tips.