[Patch v7 05/14] quote_and_decode_query: new function to quote hex-decoded queries