Correctly escape colons in queries