use sanitizeSQL on earlier queries.
Merge pull request #1248 from ESwordTheCat/nWvngEj2

use sanitizeSQL on earlier queries.