Make sure query strings are sanity checked

Make sure query strings are correctly interpolated

Signed-off-by: Ben Agricola <bagricola@squiz.co.uk>