Correctly escape variables